Skip to main content

Interface: ParagraphOptions

Defined in: src/mobjects/text/Paragraph.ts:7

Options for creating a Paragraph mobject

Extends​

Properties​

alignment?​

optional alignment: "center" | "left" | "right" | "justify"

Defined in: src/mobjects/text/Paragraph.ts:11

Text alignment within the paragraph. Default: 'left'


color?​

optional color: string

Defined in: src/mobjects/text/Text.ts:43

Text color as CSS color string. Default: the active theme's fill color (white under the default theme)

Inherited from​

TextOptions.color


fillOpacity?​

optional fillOpacity: number

Defined in: src/mobjects/text/Text.ts:45

Fill opacity from 0 to 1. Default: 1

Inherited from​

TextOptions.fillOpacity


fontFamily?​

optional fontFamily: string

Defined in: src/mobjects/text/Text.ts:37

Font family. Default: 'CMU Serif, Georgia, Times New Roman, serif' (Manim-like)

Inherited from​

TextOptions.fontFamily


fontSize?​

optional fontSize: number

Defined in: src/mobjects/text/Text.ts:35

Font size in points. Default: 48

Inherited from​

TextOptions.fontSize


fontStyle?​

optional fontStyle: string

Defined in: src/mobjects/text/Text.ts:41

Font style ('normal' | 'italic'). Default: 'normal'

Inherited from​

TextOptions.fontStyle


fontUrl?​

optional fontUrl: string

Defined in: src/mobjects/text/Text.ts:55

URL to a font file (OTF/TTF) for glyph vector extraction. When provided, loadGlyphs() can extract glyph outlines for stroke-draw animation.

Inherited from​

TextOptions.fontUrl


fontWeight?​

optional fontWeight: string | number

Defined in: src/mobjects/text/Text.ts:39

Font weight. Default: 'normal'

Inherited from​

TextOptions.fontWeight


gradient?​

optional gradient: string[]

Defined in: src/mobjects/text/Text.ts:70

Linear color gradient fill, as in Manim CE Text(..., gradient=(A, B, ...)). Provide 2+ CSS colors. The text fills with a horizontal left-to-right gradient that spans its rendered box, with the colors evenly spaced across [0, 1]. The gradient takes precedence over the flat color. It composes with t2c: a substring colored by t2c keeps that color, and only the remaining (un-colored) characters take the gradient.

Inherited from​

TextOptions.gradient


letterSpacing?​

optional letterSpacing: number

Defined in: src/mobjects/text/Text.ts:51

Letter spacing in pixels. Default: 0

Inherited from​

TextOptions.letterSpacing


lineHeight?​

optional lineHeight: number

Defined in: src/mobjects/text/Text.ts:49

Line height multiplier. Default: 1.2

Inherited from​

TextOptions.lineHeight


strokeWidth?​

optional strokeWidth: number

Defined in: src/mobjects/text/Text.ts:47

Stroke width for outlined text. Default: 0

Inherited from​

TextOptions.strokeWidth


t2c?​

optional t2c: Record<string, string>

Defined in: src/mobjects/text/Text.ts:57

Per-substring color map (text-to-color), as in Manim CE. Colors every occurrence of each substring.

Inherited from​

TextOptions.t2c


t2s?​

optional t2s: Record<string, string>

Defined in: src/mobjects/text/Text.ts:61

Per-substring font-style map (text-to-slant), e.g. { x: 'italic' }.

Inherited from​

TextOptions.t2s


t2w?​

optional t2w: Record<string, string | number>

Defined in: src/mobjects/text/Text.ts:59

Per-substring font-weight map (text-to-weight), e.g. { bold: 'bold' }.

Inherited from​

TextOptions.t2w


text​

text: string

Defined in: src/mobjects/text/Text.ts:33

The text content to display

Inherited from​

TextOptions.text


textAlign?​

optional textAlign: "center" | "left" | "right"

Defined in: src/mobjects/text/Text.ts:53

Text alignment. Default: 'center'

Inherited from​

TextOptions.textAlign


width?​

optional width: number

Defined in: src/mobjects/text/Paragraph.ts:9

Maximum width in world units for text wrapping