Toggle#

Github

Toggle is a button that switches between two states, usually 'on' and 'off', each time it is clicked. Toggle buttons are commonly used to enable or disable a feature, or to choose between two mutually exclusive options.

Definition#

Types#

Toggle Buttons are divided into two types: basic buttons and ghost buttons. type

Elements#

Toggle Buttons typically consist of text/icons, which form the button's display content. They can appear individually or in combination. element

  1. Icon
  2. Text

Based on combinations, there are the following types: layout

  1. Pure text button
  2. Left icon + text
  3. Right icon + text
  4. Pure icon button

Interaction States#

Toggle Buttons have two states: active and inactive.

Each state includes four CSS pseudo-class states: default, disabled, hover, and focused.

state-active

Sizes#

All Toggle Buttons come in three sizes: medium, small, and extra small. size