@hackr/chakra-ui-checkbox
Version:
A React Checkbox component for use in forms
40 lines (27 loc) • 696 B
Markdown
Checkbox component is used in forms when a user needs to select multiple values
from several options.
```sh
yarn add @chakra-ui/checkbox
npm i @chakra-ui/checkbox
```
```jsx
import { Checkbox } from "@chakra-ui/checkbox"
```
```jsx
<Checkbox>This is a checkbox</Checkbox>
```
CheckboxGroup is used to bind multiple checkboxes into a group, and it indicates
whether one or more options are selected.
```jsx
<CheckboxGroup defaultValue={["one", "two"]}>
<Checkbox value="one">One</Checkbox>
<Checkbox value="two">Two</Checkbox>
<Checkbox value="three">Three</Checkbox>
</CheckboxGroup>
```