silkLabel
import { silkLabel } from 'pixi-silk/text';
function silkLabel(overrides?: Omit<SilkTextOptions, "text">): LabelFactory;
A label factory that makes SilkText labels, for widgets such as ValuePill. The widget’s
style comes first, then overrides (any SilkText option but the text). From the Pixi style it
keeps the font, letter spacing, line height, left, center or right alignment, and a plain colour fill.
Gradients, strokes and drop shadows of the Pixi style are dropped.
Parameters#
| Parameter | Type |
|---|---|
overrides | Omit<SilkTextOptions, "text"> |
Returns#
Example#
import { ValuePill } from 'pixi-silk/ui/pill';
import { silkLabel } from 'pixi-silk/text';
const pill = new ValuePill({ label: silkLabel({ tabularNumbers: true }) });