Checkbox
A component enabling the user to switch between a checked and unchecked state.
Code Example
import { Checkbox, Glass } from "@coconut-xr/apfel-kruemel";
export default function Checkboxes() {
return (
<Glass borderRadius={32} padding={16} flexDirection="column" gapRow={16}>
<Checkbox defaultSelected={false} />
<Checkbox defaultSelected={true} />
</Glass>
);
}
Sandbox
Params
Name | Type | Attributes | Description |
---|---|---|---|
selected | boolean | optional / default: false | If true, the checkbox is checked |
defaultSelected | boolean | optional | The default checked state |
onSelectedChange | (value: boolean) => void | optional | Callback fired when the selected state is changed. |