Skip to content
LyEve UI v0.60.1

Form controls

Checkbox

A custom-styled checkbox built on a real native <input type="checkbox">, so form submission, keyboard focus, and screen readers all behave the way you'd expect.

Basic

With a hint

Once a month, no spam.

Disabled

You don't have permission to change this.

API

PropTypeDefaultDescription
checked booleanfalseBindable checked state.
indeterminate booleanfalseBindable: partly checked, announced as mixed.
label string no defaultInline label text.
description string no defaultA second line under the label.
error string no defaultA message under the box, tied to it for screen readers, which also mark it invalid.
icon Component no defaultA Lucide icon drawn before the label.
labelHidden booleanfalseKeeps the label for screen readers only, for a box in a table cell whose column header names it.
size 'sm' | 'md' | 'lg''md'The size of the box and its label.
variant 'inline' | 'card''inline'The card variant draws a bordered option whose whole surface is the target.
hint string no defaultSubdued hint below the label.
disabled booleanfalseDisable the checkbox.
required booleanfalseRequired for form validation. Renders a red asterisk.
id string no defaultDOM id of the underlying input.
name string no defaultNative form name.
value string no defaultNative form value (matters for grouped checkboxes).
onchange (checked: boolean) => void no defaultFires when the user toggles the checkbox.
class string no defaultExtra classes, appended to the component's own.
noAI booleanfalseKeep the value from an assistant: a FormAssist never reports it or fills it, and the control is marked data-no-ai for a browser agent.