Skip to content
pixi-silk
GitHub repository
Interface

ButtonState

import type { ButtonState } from 'pixi-silk/ui/button';

The reactive state of a SilkButton. Write shown, enabled and busy, read the rest.

Properties#

PropertyTypeDescriptionDefined in
activeComputed<boolean>True when the button accepts input: shown, settled, enabled and not busy.ui/SilkButton.ts:62
busySignal<boolean>Busy buttons show a spinner and ignore input (a save or a request in flight).ui/SilkButton.ts:54
enabledSignal<boolean>Disabled buttons dim and ignore input.ui/SilkButton.ts:52
hoveredSignal<boolean>A mouse or pen is over the button. Always false for touch.ui/SilkButton.ts:58
phaseSignal<ButtonPhase>Animation phase. Input is only accepted while shown.ui/SilkButton.ts:56
pressedSignal<boolean>A pointer is down on the button and not yet released.ui/SilkButton.ts:60
shownSignal<boolean>Wanted visibility. Writing it animates the button in or out.ui/SilkButton.ts:50