TextProps: {
anchorX?: number | "left" | "center" | "right";
anchorY?: number | "top" | "top-baseline" | "middle" | "bottom-baseline" | "bottom";
characters?: string;
clipRect?: [number, number, number, number];
color?: number | string;
debugSDF?: boolean;
depthOffset?: number;
direction?: "auto" | "ltr" | "rtl";
fillOpacity?: number;
font?: string;
fontSize?: number;
letterSpacing?: number;
lineHeight?: number;
maxWidth?: number;
onPreloadEnd?: (() => void);
onSync?: ((troika) => void);
outlineBlur?: number | string;
outlineColor?: number | string;
outlineOffsetX?: number | string;
outlineOffsetY?: number | string;
outlineOpacity?: number;
outlineWidth?: number | string;
overflowWrap?: "normal" | "break-word";
sdfGlyphSize?: number;
strokeColor?: number | string;
strokeOpacity?: number;
strokeWidth?: number | string;
text: string;
textAlign?: "left" | "right" | "center" | "justify";
whiteSpace?: "normal" | "overflowWrap" | "nowrap";
}
Type declaration
Optional
anchorX?: number | "left" | "center" | "right"
Optional
anchorY?: number | "top" | "top-baseline" | "middle" | "bottom-baseline" | "bottom"
Optional
characters?: string
Optional
clipRect?: [number, number, number, number]
Optional
color?: number | string
Optional
debugSDF?: boolean
Optional
depthOffset?: number
Optional
direction?: "auto" | "ltr" | "rtl"
Optional
fillOpacity?: number
Optional
font?: string
Optional
fontSize?: number
Optional
letterSpacing?: number
Optional
lineHeight?: number
Optional
maxWidth?: number
Optional
onPreloadEnd?: (() => void)
Optional
onSync?: ((troika) => void)
- (troika): void
Returns void
Optional
outlineBlur?: number | string
Optional
outlineColor?: number | string
Optional
outlineOffsetX?: number | string
Optional
outlineOffsetY?: number | string
Optional
outlineOpacity?: number
Optional
outlineWidth?: number | string
Optional
overflowWrap?: "normal" | "break-word"
Optional
sdfGlyphSize?: number
Optional
strokeColor?: number | string
Optional
strokeOpacity?: number
Optional
strokeWidth?: number | string
text: string
Optional
textAlign?: "left" | "right" | "center" | "justify"
Optional
whiteSpace?: "normal" | "overflowWrap" | "nowrap"