logo-icon
STW UI

Checkbox

Checkboxes are used to select or deselect a value.

Usage

svelte
import { CheckboxGroup } from 'stwui';
// OR
import CheckboxGroup from 'stwui/checkbox'; // for tree shaking

Basic

With Label and Description

Checkbox Group

With Inline Description

Checkbox Group

With Default Checked

With Disabled

With Error

Here is an error!

CheckboxGroup Props

inline boolean false

CheckboxGroup Slots

label <CheckboxGroup.Label slot="label" />
default <CheckboxGroup.Checkbox />

CheckboxGroup.Label Slots

default

CheckboxGroup.Checkbox Props

name string nanoid()
value string
indeterminate boolean false
disabled boolean false
checked boolean false
error string | undefined

CheckboxGroup.Checkbox Slots

label <CheckboxGroup.Checkbox.Label slot="label" />
description <CheckboxGroup.Checkbox.Description slot="description" />
default

CheckboxGroup.Checkbox.Label Slots

default

CheckboxGroup.Checkbox.Description Slots

default

CheckboxGroup Class Identifiers

stwui-checkbox-wrapper
stwui-checkbox
stwui-checkbox-error
stwui-checkbox-group
stwui-checkbox-description
stwui-checkbox-group-label
stwui-checkbox-label