Skip to content

Toggle

Toggles are used to switch between two states, such as on/off or enabled/disabled. They are commonly used in settings, preferences, and other interactive elements.

Loading Code Block...

To get started, install Butterfly DS via aqua:

Loading Code Block...
Loading Code Block...
sm
md
Loading Code Block...
Loading Code Block...

PropsDefaultTypeDescription
sizemdsm | mdThe size of the toggle.
title-stringThe title to display next to the toggle.
supportingTextstringThe supporting text to display below the title.
colorSchemeprimary'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info'The color scheme of the toggle.
alignmentleft'left' | 'right'The alignment of the toggle.
titleBoldtruebooleanWhether the title should be bold.
disabledfalsebooleanWhether the toggle is disabled.
checkedfalsebooleanWhether the toggle is checked.
icon
icon icon icon icon