Overview Button Copy button Field Input Number field Textarea Select Combobox Multiselect Date picker Date range picker Date-time picker Checkbox Radio group Position picker Switch Slider Dropzone Device controls Avatar Badge Card Collapsible Kbd Map Matrix Proportion bar Separator Stat Table Timeline Chat Playback Pagination Charts Chart theming Profile chart Time series chart Bar chart Isopleth chart TS diagram Box plot Rose chart Calendar chart Banner Toast Loader Progress Skeleton Empty state Error state Dropdown menu Tooltip Info tooltip Dialog Sheet Resizable Confirm dialog Breadcrumbs Command palette Mobile menu Navigation list Outline Scroll rail Sidebar Tabs
Checkbox
Tick one or several. A tick waits for Save; for something applied at once, use a Switch. On its own it is filled solid, so the mark reads in both themes. In a group it takes the same variants as a radio group: a list, rows, cards and chips.
A group
The top one stands for all: half ticked when some are.
<Checkbox label="Ammonium" bind:checked={ammonium} /> Checkbox group
Several options with one value, an array. Picked ones are tinted with the primary, as in a radio group.
Variant
["email"]
<CheckboxGroup variant="rows" bind:value>
<CheckboxGroupItem value="email" label="Email" description="A summary when…" />
<CheckboxGroupItem value="sms" label="SMS" />
<CheckboxGroupItem value="webhook" label="Webhook" />
</CheckboxGroup> Cards with images, and chips
Deliverables told apart by a picture, then an optional format as chips.
<CheckboxGroup variant="cards" bind:value={deliverables}>
<CheckboxGroupItem value="depth" label="Depth map" description="With contours, as PDF or DWG" image={src} />
…
</CheckboxGroup>
<CheckboxGroup variant="cards" columns="auto" bind:value={formats}>
<CheckboxGroupItem value="pdf" label="PDF" />
…
</CheckboxGroup> Rules
- The label is part of the hit area. Say what ticking it means, positively: "Send a copy", not "Don't send".
- A list of options stacks vertically, 12px apart.
- Options with a description, a picture or a price: a CheckboxGroup with rows or cards, the same as a radio group, so a form mixing both reads as one thing.
- Applied at once, no Save: a Switch.