Client component

Checkbox

Multi-select control with indeterminate state and a managed group.

Import#

import { Checkbox } from "astralis-ui";
// Checkbox.Group

Group#

Checkbox.Group manages the array for you. Give each checkbox a value and read onChange(string[]).

Selected: react

Sizes, colors and states#

indeterminate shows the dash, the classic "some children selected" signal for select-all rows.

Props#

PropTypeDefaultDescription
checked / defaultChecked / onChangeboolean / boolean / (e) => voidNone / false / NoneControlled / uncontrolled API.
valuestringNoneIdentifies the checkbox inside a Group.
size"sm" | "md" | "lg""md"Box size.
colorSchemeall 15 schemes"brand"Checked hue.
indeterminatebooleanfalseDash instead of check.
invalid / disabled / readOnlybooleanfalseState flags, inherited from [Field](/docs/components/field).

Checkbox.Group#

PropTypeDefaultDescription
value / defaultValue / onValueChangestring[] / string[] / (value: string[]) => voidNone / [] / NoneControlled / uncontrolled selection. onChange still fires too, but is deprecated.
orientation"horizontal" | "vertical""vertical"Lays the checkboxes out in a row or a column.
colorSchemeall 15 schemesNoneHue of every checkbox in the group; each can still override it.
disabledbooleanfalseDisables every checkbox in the group.

Keyboard#

KeyAction
TabMove between checkboxes. Each is its own tab stop
SpaceToggle the focused checkbox

Accessibility#

A real <input type="checkbox"> lives under the styled box, so keyboard, form submission and screen-reader behavior all come natively.