Skip to content

Wiggle API / TextOptions

Interface: TextOptions

Properties

align?

optional align?: "left" | "right" | "center"

Horizontal alignment. Without maxWidth, this anchors to the x position: "left" puts the left edge at x, "center" straddles x, "right" puts the right edge at x. With maxWidth, it justifies within that box, whose left edge is at x, so the text stays in place as you change alignment. Default "center".


color?

optional color?: string


font?

optional font?: string


lineHeight?

optional lineHeight?: number

Line spacing as a multiple of the font size. Default 1.2.


maxWidth?

optional maxWidth?: number

The width in pixels of the text box. Lines wrap to fit it (with a word reveal, words flow onto stacked lines), and align justifies within it, with the box's left edge at x.


size?

optional size?: number


tracking?

optional tracking?: number

Letter spacing in pixels.


weight?

optional weight?: number