Toggle

Toggle component is built on top of Blazor's Checkbox component, and support standard behaviors for checkbox, form model and validation. It must be wrapped inside Blazor's EditForm component or Blazority's Form component, and cannot be used in standalone mode. Learn more at ASP.NET Core Blazor forms and validation

Blazority provides the ToggleContainer component which encases the label, help text and validation in a single component. It also provides the underlying ToggleContainerControl component providing only the logic, allowing custom styling and formatting of the containing form components. The Toggle component can be used in either of the container components.

Using Toggle with ToggleContainer

The box is currently unchecked

Validation

Only checked is allowed.

Multiple Toggles

Option 1 can only be checked, Option 2 can only be unchecked.

Using Toggle with ToggleContainerControl

Helper Text
An unhandled error has occurred. Reload 🗙