Checkbox
llms.txtExample
Primary
Secondary
With Label
Usage
<Checkbox sizeVariant="sm" variant="primary" bind:checked />
API Reference
Checkbox
A control that allows the user to toggle between checked and not checked.
Property Type Description
checked $bindable
boolean
The checked state of the checkbox. Default:
falseindeterminate $bindable
boolean
Whether the checkbox is in an indeterminate state. Default:
falsevariant
enum
The visual variant of the checkbox. Default:
'primary'sizeVariant
enum
The size of the checkbox. Default:
'default'disabled
boolean
Whether the checkbox is disabled. Default:
falserequired
boolean
Whether the checkbox is required. Default:
falsename
string
The name of the checkbox used in form submission. Default: —
value
string
The value of the checkbox used in form submission. Default: —
onCheckedChange
function
A callback invoked when the checked state changes. Default: —
onIndeterminateChange
function
A callback invoked when the indeterminate state changes. Default: —
class
string
Additional CSS classes to apply. Default: —
ref $bindable
HTMLElement
The underlying DOM element. You can bind to this to get a reference to the element. Default: —
Property
checked
indeterminate
variant
sizeVariant
disabled
required
name
value
onCheckedChange
onIndeterminateChange
class
ref