Toggle

A basic Toggle component. This can be used in conjuction with the Row component, but may also be used on its own.

Component render

Screenshot of the text Dashboard Add-Ons UI component

<Toggle
  checked
  onChange={({ current, previous}) => console.log({ current, previous })}
/>

Properties

Property Type Description
checked boolean Whether the toggle is checked or not. If used as a slotted control inside of Row, this will be overridden by the row’s selected property.
disabled boolean Whether the toggle is disabled.
onChange (value: { current: boolean; previous: boolean; }) => void This event listener runs whenever the toggle value changes.