Skip to content
On this page

Toggle ​

A customizable toggle.

The Component ​

Component API ​

Props ​

NameDefaultDescriptionType
modelValuefalseThe value of the toggleBoolean
smallfalseThe size of the toggleBoolean
enabledClassbg-gray-500The color of the toggle when onString
disabledClassbg-gray-300The color of the toggle when offString

Events ​

NameArgumentDescription
@update:model-valuetrue/falseEmitted when toggle is clicked

Dependencies ​

  • Headless UI