Toggle

Physical switch that allows users to turn things on or off. Used for applying system states, presenting binary options and activating a state.

Default State

toggle-default


VStack(spacing: Spacing.small) {
  PBToggle(checked: true)
  PBToggle(checked: false)
}

Name and Value

toggle-name


VStack(spacing: Spacing.small) {
  PBToggle(label: "car", checked: false)
  PBToggle(label: "bike", checked: false)
}

Props

Name Type Description Default Values
isHovering Bool Changes the style of the Toggle false true false
label String Adds a label to the Toggle nil
checked Bool Changes the style of the Toggle true false