ButtonState
import type { ButtonState } from 'pixi-silk/ui/button';
The reactive state of a SilkButton. Write shown, enabled and busy, read the rest.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
active | Computed<boolean> | True when the button accepts input: shown, settled, enabled and not busy. | ui/SilkButton.ts:62 |
busy | Signal<boolean> | Busy buttons show a spinner and ignore input (a save or a request in flight). | ui/SilkButton.ts:54 |
enabled | Signal<boolean> | Disabled buttons dim and ignore input. | ui/SilkButton.ts:52 |
hovered | Signal<boolean> | A mouse or pen is over the button. Always false for touch. | ui/SilkButton.ts:58 |
phase | Signal<ButtonPhase> | Animation phase. Input is only accepted while shown. | ui/SilkButton.ts:56 |
pressed | Signal<boolean> | A pointer is down on the button and not yet released. | ui/SilkButton.ts:60 |
shown | Signal<boolean> | Wanted visibility. Writing it animates the button in or out. | ui/SilkButton.ts:50 |