Playground GitHub npm

Checkbox

Path-drawn check with optional label; Space toggles.

ui form

Preview

Installation

npx slintcn@latest add checkbox

Usage

import { Checkbox } from "slintcn/components/checkbox.slint";

Checkbox { label: "Accept terms"; checked <=> accepted; }

Properties

checked in-out bool

Two-way toggle state.

label in string

Text shown to the right of the box; clicking it also toggles.

disabled in bool

When true, the checkbox dims and stops responding.

toggled callback (bool)

Fired with the new `checked` value when the user toggles.

API

Accessibility
focusableyes
keyboardSpace

Dependencies

theme only

Installed automatically as transitive dependencies of slintcn add checkbox.