Checkbox
Turns one option on or off, around a native checkbox that keeps the value, the name and the platform's keyboard.
import { Checkbox } from '@slotted/react/checkbox';import { Stack } from '@slotted/react/stack';export default function CheckboxBasic() { return ( <Stack gap={3}> <Checkbox defaultChecked>Email the invoice to the customer</Checkbox> <Checkbox defaultChecked>Include a packing slip</Checkbox> <Checkbox>Gift-wrap the order</Checkbox> </Stack> );}Installation
The packages are a 0.x beta on npm, and their public API changes between beta releases without deprecation. One line installs the binding and the default theme.
pnpm add @slotted/react @slotted/theme @slotted/themesimport { Checkbox, CheckboxDefaultsProvider } from '@slotted/react';Sizes
size sets the box, the label and the gap to one step of the control scale: sm for dense tables and toolbars, md for most forms, lg for sparse forms. Every step keeps a 24-pixel target around the box. Inside a checkbox group, a field or a field group, the box takes their size when it states none of its own.
import { Checkbox } from '@slotted/react/checkbox';import { Stack } from '@slotted/react/stack';export default function CheckboxSizes() { return ( <Stack gap={4}> <Checkbox size="sm" defaultChecked> Show archived orders </Checkbox> <Checkbox size="md" defaultChecked> Notify the warehouse </Checkbox> <Checkbox size="lg" defaultChecked> Remember this device </Checkbox> </Stack> );}Tiles
variant="tile" frames the choice and makes the whole surface the target, so a press anywhere on the tile toggles it. A chosen tile draws an accent edge as well as a tint, and the edge stays visible in the high-contrast scheme. Lay a row of tiles out with Grid.
One copy a day, kept for 30 days.
Who changed what, and when, exported as CSV.
Available on the Scale plan.
import { Checkbox } from '@slotted/react/checkbox';import { Grid } from '@slotted/react/grid';export default function CheckboxTile() { return ( <Grid gap={4} minItemWidth="sm"> <Checkbox variant="tile" defaultChecked description="One copy a day, kept for 30 days."> Daily backup </Checkbox> <Checkbox variant="tile" description="Who changed what, and when, exported as CSV."> Audit log </Checkbox> <Checkbox variant="tile" disabled description="Available on the Scale plan."> Secondary region </Checkbox> </Grid> );}Label placement
labelPlacement="start" puts the box after its label, at the end of the row. A settings list uses it so the boxes line up on one edge whatever the length of each label.
import { Checkbox } from '@slotted/react/checkbox';import { Stack } from '@slotted/react/stack';export default function CheckboxPlacement() { return ( <Stack gap={3}> <Checkbox labelPlacement="start" defaultChecked> Email when an order ships </Checkbox> <Checkbox labelPlacement="start">Email when stock runs low</Checkbox> <Checkbox labelPlacement="start" defaultChecked> Weekly sales digest </Checkbox> </Stack> );}States
readOnly keeps the value, the focus ring and the tab stop, and refuses every change; a read-only value is still submitted. disabled sets the native disabled, which takes the box out of the tab order and out of form submission. invalid sets aria-invalid and draws a thicker border in the danger tone. All three default to the checkbox group or field around the box.
Set by the customer's tax certificate.
Not offered from the Seattle warehouse.
Confirm the count before closing the cycle.
import { Checkbox } from '@slotted/react/checkbox';import { Stack } from '@slotted/react/stack';export default function CheckboxStates() { return ( <Stack gap={4}> <Checkbox readOnly defaultChecked description="Set by the customer's tax certificate."> Tax exempt </Checkbox> <Checkbox disabled description="Not offered from the Seattle warehouse."> Same-day delivery </Checkbox> <Checkbox invalid description="Confirm the count before closing the cycle."> I counted every item on shelf A-14 </Checkbox> </Stack> );}Description
description writes help text under the label and joins the control’s accessible description, so a screen reader hears it after the name. It sits outside the label: pressing the description does not toggle the box.
One message per failed payment, sent to the billing contact.
Sent at 08:00 in the account's time zone, and skipped on days with no failures.
import { Checkbox } from '@slotted/react/checkbox';import { Stack } from '@slotted/react/stack';export default function CheckboxDescription() { return ( <Stack gap={4}> <Checkbox defaultChecked description="One message per failed payment, sent to the billing contact." > Email me when a payment fails </Checkbox> <Checkbox description="Sent at 08:00 in the account's time zone, and skipped on days with no failures."> Send a daily summary instead </Checkbox> </Stack> );}Long labels
A label that wraps keeps the box on its first line, and an unbroken string such as a URL breaks inside the column instead of widening the page.
Notices go to the billing contact on the account.
import { Checkbox } from '@slotted/react/checkbox';import { Stack } from '@slotted/react/stack';export default function CheckboxLongLabel() { return ( <Stack gap={4}> <Checkbox defaultChecked description="Notices go to the billing contact on the account."> Send notices about contract changes, delivery deadlines and changes to the return policy for this store and every other store in the group </Checkbox> <Checkbox> Forward order events to https://hooks.northwind.example/orders/fulfilment-updates </Checkbox> </Stack> );}Mixed state
indeterminate draws a dash and exposes the mixed state to assistive technology. It is a state, not a third value: the submitted value is still on or off, and the next press checks the box. Use it when one box stands for several records that disagree, as in a bulk edit.
Taxed on 2 of the 3 selected products.
import { useState } from 'react';import { Checkbox } from '@slotted/react/checkbox';import { Stack } from '@slotted/react/stack';import { Text } from '@slotted/react/typography';function summary(taxable: boolean | 'mixed'): string { if (taxable === 'mixed') return 'Taxed on 2 of the 3 selected products.'; return taxable ? 'All 3 selected products will be taxed.' : 'None of the 3 selected products will be taxed.';}export default function CheckboxIndeterminate() { const [taxable, setTaxable] = useState<boolean | 'mixed'>('mixed'); return ( <Stack gap={3}> <Text weight="medium">Edit 3 products</Text> <Checkbox checked={taxable === true} indeterminate={taxable === 'mixed'} onCheckedChange={(checked) => setTaxable(checked)} description={summary(taxable)} > Taxable </Checkbox> </Stack> );}Parent checkbox
A parent box inside a checkbox group with allValues checks and unchecks the whole set. It is checked when every value is selected, mixed when some are, and unchecked when none are; you write no state for it.
import { Checkbox } from '@slotted/react/checkbox';import { CheckboxGroup } from '@slotted/react/checkbox-group';import { FieldGroup, FieldGroupContent, FieldGroupLegend } from '@slotted/react/field-group';const WEEKDAYS = ['mon', 'tue', 'wed', 'thu', 'fri'];export default function CheckboxParent() { return ( <FieldGroup> <FieldGroupLegend>Delivery days</FieldGroupLegend> <FieldGroupContent> <CheckboxGroup allValues={WEEKDAYS} defaultValue={['mon', 'wed', 'fri']} name="days"> <Checkbox parent>Every weekday</Checkbox> <Checkbox value="mon">Monday</Checkbox> <Checkbox value="tue">Tuesday</Checkbox> <Checkbox value="wed">Wednesday</Checkbox> <Checkbox value="thu">Thursday</Checkbox> <Checkbox value="fri">Friday</Checkbox> </CheckboxGroup> </FieldGroupContent> </FieldGroup> );}Controlled
Pass checked to own the state and update it from onCheckedChange in React or (checkedChange) in Angular. The request carries the new value and its reason, pointer or keyboard, and cancel() refuses the change before the box moves.
Ships to 12 Orchestra Terrace, Walla Walla, WA 99362.
import { useState } from 'react';import { Checkbox } from '@slotted/react/checkbox';import { Field, FieldLabel } from '@slotted/react/field';import { Stack } from '@slotted/react/stack';import { TextField } from '@slotted/react/text-field';export default function CheckboxControlled() { const [sameAddress, setSameAddress] = useState(true); return ( <Stack gap={4}> <Checkbox checked={sameAddress} onCheckedChange={(checked) => setSameAddress(checked)} description="Ships to 12 Orchestra Terrace, Walla Walla, WA 99362." > Bill to the shipping address </Checkbox> {sameAddress ? null : ( <Field required> <FieldLabel>Billing address</FieldLabel> <TextField autoComplete="billing street-address" /> </Field> )} </Stack> );}Forms
A box with name submits its value when checked and nothing when unchecked, like a native checkbox. defaultChecked is the state a native form reset returns to. Change the boxes, save, then reset.
import { useState, type SubmitEvent } from 'react';import { Button } from '@slotted/react/button';import { Checkbox } from '@slotted/react/checkbox';import { FieldGroup, FieldGroupContent, FieldGroupLegend } from '@slotted/react/field-group';import { Inline } from '@slotted/react/inline';import { Stack } from '@slotted/react/stack';import { Text } from '@slotted/react/typography';export default function CheckboxForm() { const [saved, setSaved] = useState<string | null>(null); const submit = (event: SubmitEvent<HTMLFormElement>) => { event.preventDefault(); const reports = new FormData(event.currentTarget).getAll('reports'); setSaved(reports.length === 0 ? 'none' : reports.join(', ')); }; return ( <form onSubmit={submit} onReset={() => setSaved(null)}> <Stack gap={4}> <FieldGroup> <FieldGroupLegend>Reports emailed each morning</FieldGroupLegend> <FieldGroupContent> <Stack gap={2}> <Checkbox name="reports" value="daily-sales" defaultChecked> Daily sales </Checkbox> <Checkbox name="reports" value="low-stock"> Low stock </Checkbox> <Checkbox name="reports" value="payouts" defaultChecked> Payouts </Checkbox> </Stack> </FieldGroupContent> </FieldGroup> <Inline gap={3} align="center"> <Button type="submit">Save</Button> <Button type="reset" variant="outline" tone="secondary"> Reset </Button> </Inline> <Text size="sm" tone="muted" role="status"> {saved === null ? '' : `Submitted reports: ${saved}.`} </Text> </Stack> </form> );}Required
Inside a field, the box takes the field’s required as aria-required, its invalid as aria-invalid, and its error as part of the accessible description. Validate on submit, then set invalid on the field and write the error. The Angular example binds the box to a reactive form control with Validators.requiredTrue. Submit without accepting, then accept and submit again.
import { useState, type SubmitEvent } from 'react';import { Button } from '@slotted/react/button';import { Checkbox } from '@slotted/react/checkbox';import { Field, FieldError } from '@slotted/react/field';import { Inline } from '@slotted/react/inline';import { Stack } from '@slotted/react/stack';export default function CheckboxValidation() { const [accepted, setAccepted] = useState(false); const [submitted, setSubmitted] = useState(false); const [placed, setPlaced] = useState(false); const error = submitted && !accepted ? 'Accept the supplier terms to place the order.' : ''; const submit = (event: SubmitEvent<HTMLFormElement>) => { event.preventDefault(); setSubmitted(true); setPlaced(accepted); }; return ( <form noValidate onSubmit={submit}> <Stack gap={4}> <Field required invalid={error !== '' ? true : undefined}> <Checkbox checked={accepted} onCheckedChange={(checked) => { setAccepted(checked); setPlaced(false); }} > I accept the supplier terms for this purchase order </Checkbox> <FieldError live="polite" reserve> {error} </FieldError> </Field> <Inline gap={3} align="center"> <Button type="submit">Place order</Button> {placed ? <span role="status">Order placed.</span> : null} </Inline> </Stack> </form> );}Without a visible label
In a row whose other cells already say what the box selects, name the box with visually hidden text in its label. The hover wash then closes around the box alone, and the box keeps its 24-pixel target.
import { Checkbox } from '@slotted/react/checkbox';import { Inline } from '@slotted/react/inline';import { Stack } from '@slotted/react/stack';import { Text } from '@slotted/react/typography';import { VisuallyHidden } from '@slotted/react/visually-hidden';const INVOICES = [ { id: 'INV-1042', customer: 'Alfreds Futterkiste', amount: '$1,250.00' }, { id: 'INV-1043', customer: 'Ernst Handel', amount: '$4,318.40' }, { id: 'INV-1044', customer: 'Island Trading', amount: '$872.15' },];export default function CheckboxHiddenLabel() { return ( <Stack gap={2}> {INVOICES.map((invoice) => ( <Inline key={invoice.id} gap={3} align="center"> <Checkbox size="sm" value={invoice.id}> <VisuallyHidden>Select {invoice.id}</VisuallyHidden> </Checkbox> <Text numeric="tabular">{invoice.id}</Text> <Text tone="muted">{invoice.customer}</Text> <Text numeric="tabular">{invoice.amount}</Text> </Inline> ))} </Stack> );}Defaults for a section
CheckboxDefaultsProvider in React and provideCheckboxDefaults in Angular set size, variant and labelPlacement once for every box under them. A box that states a value of its own keeps it.
import { Checkbox, CheckboxDefaultsProvider } from '@slotted/react/checkbox';import { Stack } from '@slotted/react/stack';export default function CheckboxDefaults() { return ( <CheckboxDefaultsProvider size="sm" labelPlacement="start"> <Stack gap={2}> <Checkbox defaultChecked>Show prices with tax</Checkbox> <Checkbox>Show discontinued products</Checkbox> <Checkbox defaultChecked>Group orders by customer</Checkbox> </Stack> </CheckboxDefaultsProvider> );}Accessibility
| Key | Effect | Focus |
|---|---|---|
| Space | toggles the checkbox | stays on the control |
- Checkbox follows the WAI-ARIA Authoring Practices checkbox pattern (w3.org/WAI/ARIA/apg/patterns/checkbox/), and the native input supplies every part of it: the role, the checked and mixed states, Space to toggle, Enter left to the form, and disabled behavior. Checkbox adds no key listener, so the keyboard behavior is the platform’s in every language and in right-to-left documents.
- The label names the control through for, which points at an identifier Checkbox generates when you pass no id. The description sits outside the label and reaches the control through aria-describedby, so it is read as a description, and a press on it toggles nothing.
- Inside a required field the control carries aria-required, never the native required, because the native attribute turns on browser constraint validation and changes how the form submits. Pass required on the box to opt into the platform’s validation; Checkbox leaves it unchanged. disabled is the native attribute.
- A native checkbox has no read-only state, so Checkbox enforces one: it refuses the click that a pointer and Space both produce, and aria-readonly announces the state. The box keeps its tab stop, its focus ring and its full contrast, because a read-only value is real and must not look disabled.
- The invalid state does not rely on color alone. In the high-contrast scheme the theme paints every border the same color, so an invalid box also draws a thicker border. The message that says what is wrong belongs to the field or field group.
- The target is larger than the box. A 24-pixel square around the box meets WCAG 2.2 success criterion 2.5.8 at every size and density, including size="sm", where the box is 14 pixels. The label extends the target to the end of its text, and the hover wash covers exactly that area. The target is drawn around the box, so the row keeps its line height.
- The mark stays visible under forced colors. It is a mask over a background color, and forced colors replace both, so Checkbox restates the pair in system colors.
API
Checkbox
Props
checkedboolean- Makes the state controlled for the life of the component. Without it the input keeps its own state, and a native form reset restores defaultChecked. Inside a checkbox group, the group’s selection decides instead.
defaultCheckedbooleanDefaultfalse- The state an uncontrolled box starts from. It is read once and written to the input as the native attribute, which is what a form reset returns to.
indeterminatebooleanDefaultfalse- The mixed state, drawn as a dash and announced as mixed. It is a state, not a third value of checked: the submitted value stays boolean, because indeterminate is a DOM property that leaves checked unchanged.
parentbooleanDefaultfalse- Makes the box command the set its checkbox group lists in allValues. It is checked when every value is selected and mixed when some are, and a press selects or clears the whole set. Outside a group with allValues it has no effect.
size'sm' | 'md' | 'lg'Defaultmd- On Checkbox, CheckboxDefaultsProviderThe step of the control scale. When unset, the box takes the size of its checkbox group, then of its field or field group, then of the provider. The theme restates the scale per density.
variant'plain' | 'tile' | 'control'Defaultplain- On Checkbox, CheckboxDefaultsProviderHow the choice is drawn. tile frames it and makes the whole surface the target; the label still names the control, so the keyboard and the accessible name are unchanged. control is for a row of fields and buttons: the root is one control tall and holds the hover halo inside its own box, where the plain halo stands outside the root and is shorter than a control. When unset, the box takes the variant of its checkbox group, then of the provider.
labelPlacement'end' | 'start'Defaultend- On Checkbox, CheckboxDefaultsProviderWhich side of its label the box sits on. When unset, the box takes the placement of its checkbox group, then of the provider. It is never read from a field, whose labelPlacement places the field’s own label.
disabledbooleanDefault from the group or field, or false- Unset rather than false, so the box follows its checkbox group or field. Written as the native attribute, which removes the box from the tab order and from form submission.
readOnlybooleanDefault from the group or field, or false- Unset rather than false. A native checkbox has no readonly, so Checkbox refuses every change and writes aria-readonly. The box keeps its tab stop, its focus ring and its contrast, and its value is still submitted.
invalidbooleanDefault from the group or field, or false- Unset rather than false. Writes aria-invalid on the input and data-invalid on the root, which draws a thicker border in the danger tone.
requiredboolean- The native attribute, passed through unchanged; Checkbox never writes it. A field marks necessity with aria-required instead, because the native attribute turns on browser constraint validation.
descriptionReactNode- Help text under the label, referenced by aria-describedby. It sits outside the label, so it describes the control instead of naming it.
name / valuestringDefault — / on- The native submission pair: a checked box submits value under name. Inside a checkbox group, a box without a name takes the group’s, and value is the entry the group’s selection holds.
Events
| Name | Payload | When |
|---|---|---|
onCheckedChange | (checked: boolean, request: ChangeRequest<boolean>) | Before the box moves. request.value is the new state and request.previous the state it replaces. request.reason is pointer or keyboard, read from the click’s detail, and request.source is the originating event. request.cancel() refuses the change before anything commits, including the platform’s own toggle. |
onChange, onClick, onFocus, onBlur | the element’s own events | Whenever the input fires them. Checkbox composes your handler with its own instead of replacing it: yours runs first, and always runs. Calling preventDefault() in onClick stops the change as well. |
Composition
render(props: CheckboxRootProps) => ReactNode- Replaces the root element and receives every attribute it would carry. The props are typed against HTMLAttributes<HTMLElement>, so they can be spread onto a li or a label. The input cannot be replaced, because it holds the value and the platform’s keyboard behavior.
refRef<HTMLInputElement>- Reaches the input. focus() and click() are the element’s own methods.
className / stylestring / CSSProperties- Reach the root. Every other native prop reaches the input.
CheckboxDefaultsProvider{ size, variant, labelPlacement }- On a subtreeSets size, variant and labelPlacement once for every box under it, merged over an outer provider. A box that states a value keeps it. A checkbox group around the box outranks the provider for all three, and a field or field group outranks it for size.
useField()() => FieldContextValue | undefined- On inside a FieldWhat the box reads from a field: its disabled, readOnly, invalid and required states, its description and error, and its size. The box never takes the field’s identifier: it has its own label, and the field’s label would name the same control twice.
Parts
| Part | Element | Required | Purpose |
|---|---|---|---|
root | div, or the element render returns | Yes | The two-column grid: the box in one column, the label and the description in the other. It carries data-ui="checkbox", data-size, data-variant and data-label-placement, and data-checked, data-indeterminate, data-disabled, data-invalid and data-readonly. It has no role, so the native control is the only element announced. className and style reach this element. |
control | input type="checkbox" | Yes | The native checkbox. It holds the value, the name and the identifier, and receives every native attribute you write: form, required, autoFocus, every aria-* attribute and every handler. It draws the box itself with appearance: none. ref reaches it, so focus() and click() are the element’s own. |
indicator | span | Yes | The mark, drawn over the control as a mask from the glyph scale: a check when checked, a dash when mixed. It is a sibling element rather than a pseudo-element, because Firefox renders neither ::before nor ::after on an input. It takes no pointer events, so every press reaches the control underneath. |
label | label | No | Names the control through for. It carries the target and the hover wash: a 24-pixel square around the box, and a wash behind the box and the text that extends half the control gap past the box and half as far again past the text. It is as wide as its text, so the empty space beside it does not toggle the box. It renders without children too, for a box named by aria-label, and the wash then closes around the box. When its only content is visually hidden text, the root carries data-label-hidden and the wash closes the same way. |
description | p | No | Help text under the label, aligned to the label rather than to the box, and referenced by aria-describedby. It sits outside the label: inside, it would join the accessible name, and a press on it would toggle the value. |
Theming
Each token is a CSS custom property: set it in a theme, or on any element to retune every checkbox inside it.
Checkbox tokens
| Token | Default |
|---|---|
--slotted-checkbox-active-background | var(--slotted-tone-accent-subtle-active) |
--slotted-checkbox-background | var(--slotted-surface, Canvas) |
--slotted-checkbox-border-color | var(--slotted-border-strong, ButtonBorder) |
--slotted-checkbox-border-width | var(--slotted-border-width-medium, 1.5px) |
--slotted-checkbox-checked-active-background | var(--slotted-tone-accent-solid-active) |
--slotted-checkbox-checked-background | var(--slotted-tone-accent-solid) |
--slotted-checkbox-checked-border-color | var(--slotted-tone-accent-solid) |
--slotted-checkbox-checked-hover-background | var(--slotted-tone-accent-solid-hover) |
--slotted-checkbox-color | var(--slotted-text, CanvasText) |
--slotted-checkbox-description-color | var(--slotted-text-muted, GrayText) |
--slotted-checkbox-description-font-size | var(--slotted-font-size-xs, 0.75rem) |
--slotted-checkbox-disabled-background | var(--slotted-disabled-background) |
--slotted-checkbox-disabled-border-color | var(--slotted-disabled-border) |
--slotted-checkbox-disabled-color | var(--slotted-disabled-foreground) |
--slotted-checkbox-disabled-mark-color | var(--slotted-disabled-foreground) |
--slotted-checkbox-halo-color | var(--slotted-tone-accent-text) |
--slotted-checkbox-hover-border-color | var(--slotted-tone-accent-border) |
--slotted-checkbox-invalid-border-color | var(--slotted-tone-danger-border) |
--slotted-checkbox-invalid-checked-background | var(--slotted-tone-danger-solid) |
--slotted-checkbox-invalid-edge-width | var(--slotted-control-invalid-edge-width, 1px) |
--slotted-checkbox-invalid-focus-ring-color | var(--slotted-focus-ring-color-invalid, Highlight) |
--slotted-checkbox-line-height | var(--slotted-line-height-md, 1.5) |
--slotted-checkbox-mark-color | var(--slotted-tone-accent-on-solid) |
--slotted-checkbox-mark-inset | 2px |
--slotted-checkbox-radius | var(--slotted-radius-xs, 2px) |
--slotted-checkbox-readonly-background | /** * The ground `textarea` already gives a read-only value, and not the * sunken surface: at the `light` scheme the sunken step is #f8fafd * against a white surface, a difference a reader cannot see, so the state * existed in the accessibility tree and nowhere on screen. */ var(--slotted-tone-secondary-subtle-hover) |
--slotted-checkbox-size | var(--slotted-selection-size-md, 16px) |
--slotted-checkbox-tile-active-background | var(--slotted-tone-accent-subtle-active) |
--slotted-checkbox-tile-background | var(--slotted-surface, Canvas) |
--slotted-checkbox-tile-border-color | var(--slotted-control-border-color, ButtonBorder) |
--slotted-checkbox-tile-checked-background | var(--slotted-tone-accent-surface) |
--slotted-checkbox-tile-checked-border-color | var(--slotted-tone-accent-solid) |
--slotted-checkbox-tile-checked-hover-border-color | var(--slotted-tone-accent-solid-hover) |
--slotted-checkbox-tile-description-gap | var(--slotted-space-2, 0.25rem) |
--slotted-checkbox-tile-disabled-background | var(--slotted-disabled-background) |
--slotted-checkbox-tile-disabled-border-color | var(--slotted-disabled-border) |
--slotted-checkbox-tile-hover-background | var(--slotted-tone-accent-subtle-hover) |
--slotted-checkbox-tile-hover-border-color | var(--slotted-tone-accent-border) |
--slotted-checkbox-tile-inset | var(--slotted-control-padding-inline-sm, 10px) |
--slotted-checkbox-tile-invalid-border-color | var(--slotted-tone-danger-border) |
--slotted-checkbox-tile-invalid-checked-background | var(--slotted-tone-danger-surface) |
--slotted-checkbox-tile-invalid-checked-border-color | var(--slotted-tone-danger-solid) |
--slotted-checkbox-tile-radius | var(--slotted-radius-md, 6px) |
--slotted-checkbox-tile-readonly-background | var(--slotted-tone-secondary-subtle-hover) |
--slotted-checkbox-tile-readonly-border-color | var(--slotted-border-strong) |
Theme tokens it reads
| Token | Default |
|---|---|
--slotted-border-strong | Set per scheme by the theme |
--slotted-border-width-medium | 1.5px |
--slotted-border-width-thick | 2px |
--slotted-control-border-color | Set per scheme by the theme |
--slotted-control-border-width | var(--slotted-border-width-thin) |
--slotted-control-font-family | var(--slotted-font-family-sans) |
--slotted-control-font-size-lg | comfortable 14px · compact 13px · dense 12px |
--slotted-control-font-size-md | comfortable 13px · compact 12px · dense 12px |
--slotted-control-font-size-sm | comfortable 12px · compact 12px · dense 12px |
--slotted-control-height-lg | comfortable 38px · compact 32px · dense 30px |
--slotted-control-height-md | comfortable 34px · compact 28px · dense 26px |
--slotted-control-height-sm | comfortable 30px · compact 26px · dense 24px |
--slotted-control-invalid-edge-width | var(--slotted-border-width-thin) |
--slotted-control-label-gap-lg | comfortable 12px · compact 8px · dense 8px |
--slotted-control-label-gap-md | comfortable 12px · compact 8px · dense 6px |
--slotted-control-label-gap-sm | comfortable 8px · compact 6px · dense 6px |
--slotted-control-padding-inline-lg | comfortable 16px · compact 12px · dense 10px |
--slotted-control-padding-inline-md | comfortable 13px · compact 10px · dense 8px |
--slotted-control-padding-inline-sm | comfortable 10px · compact 8px · dense 6px |
--slotted-control-radius | var(--slotted-radius-sm) |
--slotted-control-shadow | Set per scheme by the theme |
--slotted-control-transition-duration | var(--slotted-duration-short) |
--slotted-control-transition-easing | var(--slotted-easing-standard) |
--slotted-disabled-background | Set per scheme by the theme |
--slotted-disabled-border | Set per scheme by the theme |
--slotted-disabled-foreground | Set per scheme by the theme |
--slotted-duration-medium | 200ms |
--slotted-focus-ring-color | Set per scheme by the theme |
--slotted-focus-ring-color-invalid | Set per scheme by the theme |
--slotted-focus-ring-offset | var(--slotted-border-width-thick) |
--slotted-focus-ring-width | var(--slotted-border-width-thick) |
--slotted-font-size-xs | 0.75rem |
--slotted-line-height-md | 1.5 |
--slotted-line-height-xs | 1.4 |
--slotted-radius-md | 6px |
--slotted-radius-xs | 2px |
--slotted-selection-halo-opacity | 0.14 |
--slotted-selection-size-lg | 18px |
--slotted-selection-size-md | 16px |
--slotted-selection-size-sm | 14px |
--slotted-space-2 | 0.25rem |
--slotted-space-3 | 0.375rem |
--slotted-surface | Set per scheme by the theme |
--slotted-target-min | 24px |
--slotted-text | Set per scheme by the theme |
--slotted-text-muted | Set per scheme by the theme |
--slotted-tone-accent-border | Set per scheme by the theme |
--slotted-tone-accent-on-solid | Set per scheme by the theme |
--slotted-tone-accent-solid | Set per scheme by the theme |
--slotted-tone-accent-solid-active | Set per scheme by the theme |
--slotted-tone-accent-solid-hover | Set per scheme by the theme |
--slotted-tone-accent-subtle-active | Set per scheme by the theme |
--slotted-tone-accent-subtle-hover | Set per scheme by the theme |
--slotted-tone-accent-surface | Set per scheme by the theme |
--slotted-tone-accent-text | Set per scheme by the theme |
--slotted-tone-danger-border | Set per scheme by the theme |
--slotted-tone-danger-solid | Set per scheme by the theme |
--slotted-tone-danger-surface | Set per scheme by the theme |
--slotted-tone-secondary-subtle-hover | Set per scheme by the theme |