InputCheckbox Component
Description
The InputCheckbox
component is a reusable checkbox input with built-in state management. It supports:
- Custom labels
- Controlled & uncontrolled behavior
- Disabled state
- Callback on change events
Props
Prop | Type | Default | Description |
---|---|---|---|
id |
string |
- | Unique identifier for the checkbox. |
label |
string |
- | Label displayed next to the checkbox. |
onChange |
(data: { id: string, value: boolean }) => void |
- | Callback function triggered on change. |
defaultValue |
boolean |
false |
Initial checked state. |
disabled |
boolean |
false |
Disables the checkbox input. |
Example Usage
Useful Links
🔗 GitHub Repository (Core): Liberty Core
🔗 GitHub Repository (Test Project): Liberty Test
📖 Live Documentation: Liberty Core Docs
💖 Sponsor & Support: Sponsor Liberty Core