Switch
A switch lets users turn a boolean setting on or off.
Switches are useful for active/inactive states, feature toggles, visibility settings, notification settings, and workflow flags. They are input components, so they read from and save to one field on the record.
When to Use It
Use a switch when the value behaves like an immediate on/off setting.
Switches are most intuitive when users understand the effect of turning something on or off. For a quieter yes/no field in a form, use Checkbox.
What Can Be Configured
Label
The label should describe what is enabled when the switch is on, such as "Active", "Visible on website", or "Send notifications".
Behaviour
A switch can refresh the record after it changes when other parts of the page depend on the setting.
Layout and Spacing
Switches can include extra spacing above them so they align well with neighbouring fields. They often work best near the content or settings they affect.