Skip to content
Inputs & Forms

Switch

client39.25 kB
@stellaria/nebula-webSwitchProps

Preview

Props

10
PropTypeDefault

checked

boolean

—

color

ColorExtended

—

defaultChecked

booleanfalse

disabled

boolean

—

draggable

booleantrue

label

ReactNode

—

onChange

((checked: boolean) => void)

—

rootClassName

string

—

size

Size

—

value

string

—

Slot props

2

Each one spreads over an inner element, so you can restyle a region without forking the component.

PropTypeDefault

indicatorProps

The track. The thumb is NOT exposed: motion moves it with a computed style.

BoxSlotProps

—

labelProps

Label next to the switch.

TextSlotProps

—

Also accepts

On top of its own props, this component forwards these groups.

HTML attributes · 300Style props · 127