Skip to content
pixi-silk
GitHub repository
Interface

ButtonBlockOptions

import type { ButtonBlockOptions } from 'pixi-silk/ui/blocks';

Options of a ButtonBlock.

Extends#

Properties#

PropertyTypeDescriptionInherited fromDefined in
active?Value<boolean>Toggled look (a lit face).-packages/pixi-silk/src/ui/blocks.ts:837
colors?ButtonColorsColours.-packages/pixi-silk/src/ui/blocks.ts:841
enabled?Value<boolean>Whether it takes input. A disabled button dims. Default true.-packages/pixi-silk/src/ui/blocks.ts:839
flat?booleanThe cheap look: the face is one shape with its border, its colour mixed on the CPU from the base, active, hover and disabled states, and no blurred shadow. A full button stacks up to six layers over its face while it animates. Default on for a lowEnd surface, else off.-packages/pixi-silk/src/ui/blocks.ts:851
height?numberHeight. Default 0 (set by the layout through onSize).BlockOptions.heightpackages/pixi-silk/src/ui/blocks.ts:42
icon?IconPainterIcon on the face, drawn with SilkGraphics shapes.-packages/pixi-silk/src/ui/blocks.ts:835
label?Value<string>Text on the face.-packages/pixi-silk/src/ui/blocks.ts:831
labelStyle?DrawTextStyleFont of the label. Default 20 px bold.-packages/pixi-silk/src/ui/blocks.ts:833
layer?BlockLayerWhich layer of the surface paints the block. 'auto' (default) starts in the cached still layer and moves to the live layer the first time the block animates or changes. 'still' stays in the still layer: a change repaints and re-caches that layer, and the block keeps its place under live blocks. 'live' starts in the live layer.BlockOptions.layerpackages/pixi-silk/src/ui/blocks.ts:49
onPress() => voidCalled on a press.-packages/pixi-silk/src/ui/blocks.ts:825
pressScale?numberScale while pressed. Default 0.92.-packages/pixi-silk/src/ui/blocks.ts:843
radius?numberCorner radius of 'rect', design units. Default 16.-packages/pixi-silk/src/ui/blocks.ts:829
shadow?numberSoft shadow under the face: blur in design units, 0 for none. Default 0. Free at rest when the surface caches.-packages/pixi-silk/src/ui/blocks.ts:845
shape?"rect" | "pill" | "circle"Face shape. Default 'pill'.-packages/pixi-silk/src/ui/blocks.ts:827
width?numberWidth. Default 0 (set by the layout through onSize).BlockOptions.widthpackages/pixi-silk/src/ui/blocks.ts:40