Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

check-box

v2.6.5arrow_drop_down
v2.6.5
v2.5.5
STATUS
Passing
DOWNLOADS
767
LICENSE
Apache 2.0
VISIBILITY
Public
PUBLISHED
10 months ago
SIZE
35 KB
A checkbox toggle control.
1 contributor
Use check-box in your project ?
Copied
npm i @bit/grommet.grommet.check-box
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
toggle layout
modifieddraft
chevron_left
chevron_right

CheckBox

A checkbox toggle control.

Usage

import { CheckBox } from 'grommet';
<CheckBox />

Properties

checked

Same as React

boolean

disabled

Same as React . Also adds a hidden input element with the same name so form submissions work.

boolean

id

The DOM id attribute value to use for the underlying element.

string

label

Label text to place next to the control.

node

name

The DOM name attribute value to use for the underlying element.

string

onChange

Function that will be called when the user clicks the check box. It will be passed a React event object. The current state can be accessed via event.target.checked. Same as React .

function

reverse

Whether to show the label in front of the checkbox.

boolean

toggle

Whether to visualize it as a toggle switch.

boolean

indeterminate

Whether state is indeterminate. NOTE: This can only be used with non-toggle components

boolean

Intrinsic element

input