Components
The kit, every variant, both themes
Everything here is imported from @/components/ui (packages/ui). Variant lists are checked against the components' own types, so this page can't describe a variant that doesn't exist. When to use what: DESIGN.md §3.
Toggle · ToggleGroup
Pressed-state controls: formatting, filter chips, view switches. ToggleGroup for one-of-N (or many-of-N) in a row.
<Toggle variant="default | outline" size="sm | default | lg" aria-label="Bold"><Bold /></Toggle>
<ToggleGroup value={align} onValueChange={setAlign}>
<ToggleGroupItem value="left">Left</ToggleGroupItem> …Fields
Every field is h-8, pill, bg-surface-subtle, hover border-strong, focus ring-ring/30. Label above; helper below; aria-invalid turns the ring red.
Shown in the recipient's inbox.
<Field> <FieldLabel htmlFor="name">Sender name</FieldLabel> <Input id="name" placeholder="Acme" /> <FieldDescription>Shown in the inbox.</FieldDescription> </Field>
<InputGroup> <InputGroupAddon><Search /></InputGroupAddon> <InputGroupInput placeholder="Search…" /> </InputGroup>
<Textarea placeholder="…" rows={3} /><Select items={{ eu: "EU (Frankfurt)", us: "US (Virginia)" }} defaultValue="eu">
<SelectTrigger><SelectValue /></SelectTrigger>
<SelectContent>
<SelectGroup><SelectLabel>Region</SelectLabel>
<SelectItem value="eu">EU (Frankfurt)</SelectItem> …<Combobox items={items}>
<ComboboxInput placeholder="Pick a template" />
<ComboboxContent><ComboboxList>{(item) => <ComboboxItem key={item} value={item}>{item}</ComboboxItem>}</ComboboxList></ComboboxContent>
</Combobox><Checkbox id="c" /> <Label htmlFor="c">…</Label> <RadioGroup defaultValue="a"><RadioGroupItem value="a" id="a" /> … <Switch size="sm | default" />
<Slider defaultValue={40} min={0} max={100} />Slide to confirm
<ConfirmDialog slide slideTestid="protected-override-slider" confirmLabel="Delete 3 contacts" … />
Card
filled for information, outline for selectable objects / tables / previews, raised above a filled region. tone for status. render for link tiles. Never nested.
Tabs
variant="default" is the pill segmented control (views, sections); variant="line" is the underline (filters over a list). Route tabs: SegmentedTabLinks; state tabs: SegmentedTabs.
<Tabs defaultValue="all"><TabsList><TabsTrigger value="all">All</TabsTrigger>…</TabsList><TabsContent value="all">…</TabsContent></Tabs>
<TabsList variant="line">
Table
Rows hover surface-hover, selected surface-active. density="compact" for lookup tables. Numeric columns right-aligned with their header. Frame it with an outline Card or rounded-xl ring.
| Domain | Status | Sent | |
|---|---|---|---|
| acme.com | Verified | 12,757 | |
| mail.acme.com | Pending | 0 | |
| old.acme.co | Failed | — |
| Domain | Status | Sent | |
|---|---|---|---|
| acme.com | Verified | 12,757 | |
| mail.acme.com | Pending | 0 | |
| old.acme.co | Failed | — |
Overlays
Dialog for tasks, AlertDialog for confirmations (ConfirmDialog wraps it), Sheet for side panels, Popover for anchored controls, DropdownMenu for object actions, Tooltip (via Hint) for text only.
<DialogContent size="sm">…</DialogContent> // confirmation <DialogContent>…</DialogContent> // md — the form default <DialogContent size="lg">…</DialogContent> // form + table / two columns <DialogContent size="xl">…</DialogContent> // editor / preview
<Dialog><DialogTrigger render={<Button variant="outline" />}>Open</DialogTrigger><DialogContent>…</DialogContent></Dialog>Status & feedback
Badge for status chips. Alert for persistent in-context notices. Skeleton/Spinner/Progress for pending. Empty and error regions use EmptyState / ErrorState (see Patterns).
<Badge variant="default | secondary | outline | ghost | success | warning | destructive | info | brand | teal | violet | link">
<Alert variant="neutral | info | success | warning | destructive" size="sm | default" title="…" action={<Button variant="link" size="xs" />}><Skeleton className="h-4 w-40" /> <Spinner /> <Progress value={64} tone="warning"><ProgressLabel>Plan usage</ProgressLabel><ProgressValue /></Progress>Verify domain
Add sender
Send a test
Interaction states
Hover, pressed, selected, focus-visible, disabled — all from the kit. Tab through this row to see focus rings.