TidalUI

Checkbox preview

Checked, unchecked, mixed and disabled states.

pro · Forms · primitive

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/checkbox

Import components/ui/tidal.css, components/ui/checkbox.css. Wrap installed components in tidal-scope.

Preview

Checkbox component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/checkbox.css";
import{TidalCheckbox}from"./components/ui/checkbox";
export default()=><div className="tidal-scope"><TidalCheckbox checked={false} label={"Demo"} onCheckedChange={() => {}}/></div>;

API and props

TidalCheckbox.checked (required)
TidalCheckedState

Required checked value accepted by this exported component.

TidalCheckbox.label (required)
string

Required label value accepted by this exported component.

TidalCheckbox.onCheckedChange (required)
(checked: TidalCheckedState) => void

Callback invoked when the checked change interaction is proposed.

TidalCheckbox.description
string | undefined

Optional description value accepted by this exported component.

TidalCheckbox.error
string | undefined

Optional error value accepted by this exported component.

TidalCheckbox.rootClassName
string | undefined

Optional root class name value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas