SegmentedSwitchOptions
import type { SegmentedSwitchOptions } from 'pixi-silk/ui/modes';
Options of SegmentedSwitch.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
height? | number | Pill height. Default 36. | ui/modes.ts:283 |
iconSize? | number | Icon size of segments with an icon. Default 18. | ui/modes.ts:287 |
onChange? | (id: string, previous: string) => void | Called when state.value changes, by the user or by code. | ui/modes.ts:297 |
options | SegmentOption[] | Segments from left to right. Fixed after construction. | ui/modes.ts:277 |
padding? | number | Gap between track and thumb. Default 3. | ui/modes.ts:285 |
profiles? | Partial<Record<InputKind, Partial<InputProfile>>> | Per pointer kind overrides of slop, which sets how far off the pill a slide still counts. | ui/modes.ts:293 |
segmentWidth? | number | Minimum width of a segment. Segments grow to fit their content. Default 64. | ui/modes.ts:281 |
textStyle? | TextStyleOptions | Style of segment labels. Default font size 13. | ui/modes.ts:289 |
theme? | Partial<SegmentedTheme> | Colours that replace parts of SEGMENTED_THEME. | ui/modes.ts:291 |
ticker? | Ticker | null | Ticker driving the animation. Default Ticker.shared. null for manual SegmentedSwitch.tick. | ui/modes.ts:295 |
value? | string | Selected id. Default the first. | ui/modes.ts:279 |