Skip to content
SevenUI
Sign inGet Pro
On this page

Checkbox

Displays a checkbox built on the Base UI Checkbox primitive, for accepting terms, toggling settings, and picking several options.

Displays a checkbox built on the UI SDK Checkbox component, for accepting terms, toggling settings, and picking several options.

Installation

Usage

Examples

Indeterminate

A parent checkbox reflecting a partial selection — indeterminate is independent of checked and controlled by you.

Disabled

API reference

The UI SDK flavour is built on UI SDK Checkbox. Its API is the SevenUI wrapper's, the same in both flavours: export names, props, data-slot values and the render prop, so code that uses only the SevenUI exports compiles against either flavour. What behaves differently, and any prop that is ignored or not supported, is listed below; code that imports a Base UI or third-party library directly needs changes. Switch to Base UI to read the prop tables, which describe that shared API in Base UI's terms.

Differences on UI SDK

  • An uncontrolled checkbox with indeterminate stays mixed until the prop is cleared. inputRef and uncheckedValue are not supported.

Checkbox

Extends the Base UI Checkbox Root — all its props apply. The check indicator is built in; pair with Label for the click-target text.

PropTypeDefault
checked / defaultCheckedbooleanfalse
onCheckedChange(checked: boolean) => void—
indeterminatebooleanfalse
disabledbooleanfalse
name / valuestring — form submission—

Was this page helpful?