The Checkbox
component provides a customizable checkbox input with optional label support. It's designed for ease of integration and customization in various user interfaces.
import React from 'react';
import { Checkbox } from '~/ui/components/Form';
export default function App() {
return (
<div>
<Checkbox
id="agree"
label="I agree to the terms and conditions."
checked={true}
/>
</div>
);
}
Name | Type | Default | Description |
---|---|---|---|
className | string | undefined | CSS classes to be applied to the component container |
label | ReactNode | undefined | The content to be used as the label for the checkbox |
id | string | undefined | Element ID for the checkbox, also used to associate the label |
disabled | boolean | false | Whether the checkbox is disabled or not |
checked | boolean | false | Indicates whether the checkbox is checked |