Switch Panel
A settings panel being set up: a pointer flips a switch, a dependent row unfolds, an option is picked and a slider dragged, and a status pill shows saving then saved. Visitors can use the switches, the option group and the slider themselves, with the mouse or the keyboard.
pixikit.com/docs/blocks/illustrations/switch-panel
Customize
Autoplay
Loop
Speed1.0x
Height360px
Width560px
Props
12| Name | Type | Default | Description |
|---|---|---|---|
rows | SwitchPanelRow[] | DEFAULT_ROWS | The settings, top to bottom. |
title | string | "Notifications" | The name in the top bar. |
savingLabel | string | "Saving" | The status shown right after a change. |
savedLabel | string | "Saved" | The status shown once the change is stored. |
onChange | (index: number, value: boolean | number) => void | None | Called when the visitor changes a row: a boolean for a switch, the option index for a choice, the number for a range. |
autoplay | boolean | true | Starts when the scene scrolls into view; when off it waits for a click on replay. |
loop | boolean | true | Plays again from the start layout after the hold. |
speed | number | 1 | Playback speed multiplier. |
height | number | 360 | The height of the scene in px. |
width | number | 560 | The widest the scene grows, in px. It shrinks to fit a narrower parent. |
replayLabel | string | "Replay" | What screen readers call the replay button. |
className | string | None |