ValarSvelte

Checkbox

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

Docs API Reference

Default

Invalid State

Set aria-invalid on the checkbox and data-invalid on the field wrapper to show the invalid styles.

Basic

Pair the checkbox with Field.Field and Field.Label for proper layout and labeling.

Description

Use Field.Content and Field.Description for helper text.

Disabled

Use the disabled prop to prevent interaction and add the data-disabled attribute to the <Field.Field> component for disabled styles.

Group

Use multiple fields to create a checkbox list.

Table