Switches allow users to toggle between two states, on or off. On mobile, these are often used as a replacement for checkboxes.
Use a string to set the text shown by the switch as a BPKText label
import Backpack_SwiftUI @State var isEnabled = true BPKSwitch(isOn: $isEnabled, text: "Enable")
Use a custom View as the label of the switch
import Backpack_SwiftUI @State var isEnabled = true BPKSwitch(isOn: $isEnabled) { BPKText("Enable") .paddding() }