@moxijs/ui - v0.3.5
    Preparing search index...

    Interface UILabelProps

    UILabel configuration.

    interface UILabelProps {
        align?: TextAlign;
        color?: number;
        fontFamily?: string;
        fontSize?: number;
        fontType?: FontType;
        fontWeight?: string;
        lineHeight?: number;
        text: string;
        wordWrap?: boolean;
        wordWrapWidth?: number;
    }
    Index

    Properties

    align?: TextAlign

    Text alignment

    color?: number

    Text color (hex number)

    fontFamily?: string

    Font family name. For canvas: Any CSS font family (e.g., 'Arial', 'Helvetica') For MSDF: Must match the loaded MSDF font's family name For bitmap: Must match the loaded bitmap font's family name

    fontSize?: number

    Font size in pixels

    fontType?: FontType

    Font rendering type.

    • 'canvas' (default): Standard PIXI.Text with DPR scaling
    • 'msdf': Multi-channel Signed Distance Field for crisp text at any scale
    • 'bitmap': Pre-rendered bitmap font atlas
    fontWeight?: string

    Font weight (only applies to canvas fonts)

    lineHeight?: number

    Line height as a multiplier of fontSize (like CSS unitless line-height).

    • 1.0 = no extra spacing (tight)
    • 1.2 = 20% extra spacing (default)
    • 2.0 = double spacing Note: This is NOT absolute pixels - use 1.2, not 24 for an 18px font.
    text: string

    The text to display

    wordWrap?: boolean

    Enable word wrapping

    wordWrapWidth?: number

    Word wrap width (required if wordWrap is true)