Switch

Overview

The Switch module is a simple toggle that sets the toggle value to true or false when clicked. This is useful for forms where agreeing to a value or selecting a value is needed.

Switch Properties

Switch Input Id (required) String Sets the Id of the switch input, which can be referenced by other elements.

Switch Label String Sets the display label of the switch. Example: 'Toggle dark mode.'

Is this field required? Checkbox, default disabled If enabled, guests will be required to toggle this switch on. If a guest attempts to submit the form without toggling it on, a default error message will be displayed.

Custom Required Message String This field can be used to customize the error message to be displayed if the switch for required field is not toggled on. Example: 'Please toggle this switch before proceeding.'

Size Dropdown, default md Denotes the sizing of the switch. The following options are available:

  • sm

  • md

  • lg

Style attribute String, css style property input Can apply additional CSS to customize the switch.

Last updated

Was this helpful?