Skip to content
h v3.13.3
Search the docs
Find a component, section or page.

Checkbox

A control that allows the user to toggle between checked and not checked.

By clicking this checkbox, you agree to the terms and conditions.

Installation

pnpm add @heyramzi/ui bits-ui

Usage

import { Checkbox } from "@heyramzi/ui/shadcn/checkbox";

Keyboard and accessibility

Key Does
Space Checks or unchecks the box.
  • Enter does nothing, so it can't submit the form by accident.
  • An indeterminate box reports mixed. Space from there checks it.

API reference

ref bindable HTMLElement | null
Default null
checked bindable boolean
Default false
indeterminate bindable boolean
Default false
class string
...rest
Every prop of Checkbox.Root from bits-ui except child, children
Prop Type Default
ref bindable HTMLElement | null null
checked bindable boolean false
indeterminate bindable boolean false
class string
...rest Every prop of Checkbox.Root from bits-ui except child, children