Checkbox
The Checkbox component is a simple checkbox input. It can be used on its own or inside the FormWrapper component if you have multiple inputs.
See all the examples and details in the Storybook.
Usage
tsx
import { Checkbox } from "@samgl/graffiti-ui";
const MyCheckbox = () => {
return (
<Checkbox
label="The quick brown fox jumps over the lazy dog"
onClick={() => alert("Clicked!")}
/>
);
};
Props
Prop | Type | Default | Optional | Description |
---|---|---|---|---|
label | string | ❌ | The label to display next to the checkbox. | |
className | string | ✅ | The class name of the component, generally used when extending the component with a styled component. |
All other props will also be passed to the underlying input element.