A styled checkbox input with optional label.
import { Checkbox } from '@florex/ui';<Checkbox label="Accept terms" />| Prop | Type | Default | Description |
|---|---|---|---|
| label | string |
— | Text label displayed next to the checkbox |
| id | string |
— | HTML id (links label to input) |
| className | string |
— | Additional CSS classes |
Also accepts all native <input> HTML attributes (except type).
const [checked, setChecked] = useState(false);
<Checkbox
label="Enable notifications"
checked={checked}
onChange={(e) => setChecked(e.target.checked)}
/><Checkbox label="Read-only option" disabled checked />