fannypack
Version:
An accessible, composable, and friendly React UI Kit
63 lines (45 loc) • 1.09 kB
text/mdx
---
name: Checkbox
route: /form/checkbox
menu: Form
---
import { Playground, PropsTable } from 'docz';
import { Box } from '../primitives/index';
import Checkbox from './index';
`import { Checkbox } from 'fannypack'`
<Playground>
<Checkbox label="Click me" />
</Playground>
Make the checkbox disabled with the `disabled` prop.
<Playground>
<Checkbox disabled label="Click me" />
<Checkbox checked disabled label="Click me" />
</Playground>
A checkbox can use different states (as per palette) such as `danger`, `success` and `warning`.
<Playground>
<Checkbox state="danger" label="Click me" />
<Checkbox state="success" label="Click me" />
<Checkbox state="warning" label="Click me" />
<Checkbox state="primary" label="Click me" />
</Playground>
<PropsTable of={Checkbox} />
```jsx
{
base: string | Object,
icon: {
base: string | Object,
checked: string | Object
disabled: string | Object,
focus: string | Object
tick: string | Object
}
}
```