Checks & switches
CheckBoxControl · RadioGroupControl · SwitchControl · RatingControlLet users check items, switch options on, pick one of several or give a star rating.
Overview
The small Blazor inputs that most forms need: CheckBoxControl, SwitchControl, RadioGroupControl for one choice out of a few, and RatingControl for stars. Use checkboxes for a list users check off, where a select-all box can show that only some are checked, and a switch for a single option users turn on or off, such as Parking pass. All four bind their value two ways.
Examples
#Checkboxes with select all
Choose a new hire's optional benefits: with only some checked, the parent shows a dash (Indeterminate), and the monthly deduction follows every change; check the parent to set all three. The health plan is checked and Disabled.
Monthly deduction: $129
#Radio group and switches
Pick the new hire's work pattern, then switch Parking pass or Standing desk on and off; the line below reads your choices. Remote is a disabled item, and one switch is on and disabled.
Hybrid; parking pass requested; standing desk not requested; laptop included.
#Rating
Click a star to rate onboarding week: each click adds a rating to the 8 already given. The line below shows the new average, and its ReadOnly stars show it rounded, so they move only when the rounded value changes.