Tile UI · SolidJS
CSR · SSR · SSGCheckbox
An accessible tri-state SolidJS checkbox with controlled and native form state.
import { createSignal } from 'solid-js';
import { Button, Checkbox } from '@tile-ui/solid';
export default function CheckboxDemo() {
const [checked, setChecked] = createSignal(false);
const [submitted, setSubmitted] = createSignal('not submitted');Use Checkbox for tri-state choices that participate in native forms.
Registry install
pnpm dlx shadcn@latest add @tile-ui/checkbox
Package usage
import { Checkbox } from '@tile-ui/solid';
<Checkbox />
Highlights
- Indeterminate state support
- Accessible checkbox role
- Pairs with Field and Form
Registry dependencies
| Item | Purpose |
|---|---|
checkbox |
Component source and module styles |
core |
Framework-agnostic logic helpers |
utils |
Shared utility helpers |
styles |
Shared SCSS tokens and globals |
API reference
Checkbox
| Prop | Type | Default |
|---|---|---|
checked |
CheckboxCheckedState |
— |
defaultChecked |
CheckboxCheckedState |
— |
onCheckedChange |
(checked: CheckboxCheckedState) => void |
— |
name |
string |
— |
value |
string |
— |
form |
string |
— |
required |
boolean |
— |