Skip to content
pixi-silk
GitHub repository
Entry point

pixi-silk/ui/modes

SegmentedSwitch and ModeSwitcher: tool mode pickers, including the hold-a-key ring.

import { ModeSwitcher, SegmentedSwitch } from 'pixi-silk/ui/modes';

Classes#

ClassDescription
ModeSwitcherQuick mode switching for editors, the hold-a-key ring of paint and 3D tools.
SegmentedSwitchA pill of choices with a thumb that slides to the selected one, stretching on the way.

Interfaces#

InterfaceDescription
ModeSwitcherOptionsOptions of ModeSwitcher.
ModeSwitcherStateThe reactive state of a ModeSwitcher.
SegmentedStateThe reactive state of a SegmentedSwitch. Write value or enabled to change it.
SegmentedSwitchOptionsOptions of SegmentedSwitch.
SegmentedThemeColours of a SegmentedSwitch (any Pixi colour).
SegmentOptionOne choice of a SegmentedSwitch.

Variables#

VariableDescription
SEGMENTED_THEMEDark default theme of SegmentedSwitch. Override single colours with the theme option.