Skip to content
pixi-silk
GitHub repository
Interface

SegmentedSwitchOptions

import type { SegmentedSwitchOptions } from 'pixi-silk/ui/modes';

Options of SegmentedSwitch.

Properties#

PropertyTypeDescriptionDefined in
height?numberPill height. Default 36.ui/modes.ts:283
iconSize?numberIcon size of segments with an icon. Default 18.ui/modes.ts:287
onChange?(id: string, previous: string) => voidCalled when state.value changes, by the user or by code.ui/modes.ts:297
optionsSegmentOption[]Segments from left to right. Fixed after construction.ui/modes.ts:277
padding?numberGap 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?numberMinimum width of a segment. Segments grow to fit their content. Default 64.ui/modes.ts:281
textStyle?TextStyleOptionsStyle 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 | nullTicker driving the animation. Default Ticker.shared. null for manual SegmentedSwitch.tick.ui/modes.ts:295
value?stringSelected id. Default the first.ui/modes.ts:279