bpk-component-checkbox

5.1.2 • Public • Published

bpk-component-checkbox

Backpack checkbox component.

Installation

npm install bpk-component-checkbox --save-dev

Usage

import React from 'react';
import BpkCheckbox from 'bpk-component-checkbox';

export default () => (
  <BpkCheckbox
    name="prefer-directs"
    onChange={() => console.log('prefer directs changed!')}
    label="Prefer directs"
    checked
  />
);

Props

Property PropType Required Default Value
name string true -
label node true -
checked bool false false
disabled bool false false
indeterminate bool false false
required bool false false
smallLabel bool false false
valid bool false null
white bool false false

indeterminate prop

The indeterminate prop is only a visual clue, it does not affect the checked state of the checkbox. If indeterminate is flagged then the checkbox will be displayed with a minus sign in the box. This is used when there is a checkbox group and the parent displays this state when not all child checkboxes are selected.

Theme Props

  • checkboxCheckedColor

Readme

Keywords

none

Package Sidebar

Install

npm i bpk-component-checkbox

Weekly Downloads

1

Version

5.1.2

License

Apache-2.0

Unpacked Size

34.5 kB

Total Files

12

Last publish

Collaborators

  • anambl
  • skyscanner-koalasquad
  • gert-jan.vercauteren
  • frugoman
  • marianeumayer-skyscanner
  • ojcurt
  • mattface