Lumeo

Checkbox

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

Installation

dotnet add package Lumeo

One-time app setup (AddLumeo(), CSS & JS) is covered in the installation guide.

Usage

@using Lumeo

<Checkbox />

When to Use

  • Allow users to select multiple options from a list of choices.
  • Present a single boolean toggle such as accepting terms and conditions.
  • Implement "select all" patterns with indeterminate state for bulk actions.

Checked: True

Selected: A, C

On supported mobile browsers, checking or unchecking this checkbox triggers a short vibration via navigator.vibrate(10). Desktop browsers silently no-op.

Keyboard Interactions

Key Action
SpaceToggles the checkbox between checked and unchecked.
TabMoves focus to the next focusable element.
Shift+TabMoves focus to the previous focusable element.

Parameter Coverage

Boolean parameters demoed in both states.

Checked

Checked = false

Checked = true

Disabled

Disabled = false

Disabled = true

IsIndeterminate

IsIndeterminate = false

IsIndeterminate = true

Invalid

Invalid = false

Invalid = true

API Reference

Checkbox

Property Type Default Description
Checked bool false Whether the checkbox is checked. Use with @bind-Checked for two-way binding.
CheckedChanged EventCallback<bool> Callback invoked when the checked state changes.
Disabled bool false When true, prevents user interaction and dims the checkbox.
IsIndeterminate bool false Shows a mixed/indeterminate state with a minus icon.
Animated bool false When true and checked, the check mark draws itself in via stroke-dasharray and the box plays a 200ms scale bounce.
IsIndeterminateChangedEventCallback<bool>Two-way binding callback for the indeterminate flag.
Labelstring?nullOptional inline label rendered next to the checkbox.
Descriptionstring?nullSecondary text shown below the label.
Idstring?nullExplicit HTML id; linked to the label for accessibility.
AriaLabelstring?nullAccessible label for screen readers when no visible label is present.
RequiredboolfalseMarks the field as required for form validation.
InvalidboolfalseApplies a destructive ring to indicate a validation error.
ErrorTextstring?nullError message shown below when Invalid is true (standalone).
HelperTextstring?nullHelp text shown below when there is no error (standalone).
Namestring?nullHTML name attribute for form identification.
FormFieldFormFieldContext?nullCascaded context from a parent FormField; drives validation state automatically.
HapticFeedbackboolfalseWhen true, triggers a short haptic vibration via navigator.vibrate(10) on each state change. Silently no-ops on browsers without the Vibration API (e.g. iOS Safari).
  • Switch — A toggle for on/off settings with immediate effect, like enabling dark mode.
  • RadioGroup — Use when only one option can be selected from a list.
  • Toggle — A pressable button-style control for toggling a single state.