Skip to content
pixi-silk
GitHub repository
Interface

TextBlockOptions

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

Options of a TextBlock.

Extends#

Properties#

PropertyTypeDescriptionInherited fromDefined in
align?readonly [number, number]Where the text sits in the slot: 0 left or top, 0.5 centre, 1 right or bottom. Default [0, 0.5].-packages/pixi-silk/src/ui/blocks.ts:696
fill?Value<FillInput>Paint of the letters. Default white.-packages/pixi-silk/src/ui/blocks.ts:694
height?numberHeight. Default 0 (set by the layout through onSize).BlockOptions.heightpackages/pixi-silk/src/ui/blocks.ts:42
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
style?DrawTextStyleFont and layout.-packages/pixi-silk/src/ui/blocks.ts:692
textValue<string>The text. A signal repaints the block when it changes.-packages/pixi-silk/src/ui/blocks.ts:690
width?numberWidth. Default 0 (set by the layout through onSize).BlockOptions.widthpackages/pixi-silk/src/ui/blocks.ts:40