Form

Checkbox

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

For touch devices, a switch is generally recommended over this.

We recommend using a select group to create a group of checkboxes.

CLI

To generate a specific style for customization:

dart run forui style create checkbox

Usage

FCheckbox(...)

1FCheckbox(
2 style: const .delta(size: 20),
3 leadingLabel: false,
4 enabled: true,
5 value: false,
6 onChange: (value) {},
7 label: const Text('Accept terms'),
8 description: const Text('You agree to our terms of service'),
9 error: null,
10)

Examples

Leading Label

Disabled

Error

Without Label

Form

On this page