Murasaki
Components

Checkbox

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

Usage

import { Checkbox } from "@murasakijs/ui";
<Checkbox id="terms" />

API Reference

Props

PropTypeDefault
checkedboolean | "indeterminate"
defaultCheckedboolean | "indeterminate"
onCheckedChange(checked: boolean | "indeterminate") => void
disabledbooleanfalse
requiredbooleanfalse
namestring
valuestring"on"

Checkbox maps the familiar checked API to React Aria's accessible checkbox state and interaction model.

Improve this page on GitHub

On this page