Strata - v1.4.10
    Preparing search index...

    Interface DialogBoxProps

    Props for the DialogBox component.

    A full-featured dialogue system for RPGs and visual novels with typewriter effects.

    interface DialogBoxProps {
        backgroundColor?: string;
        className?: string;
        continueIndicator?: string;
        currentLine?: number;
        fontFamily?: string;
        fontSize?: number;
        imagePosition?: "left" | "right";
        lines?: DialogLine[];
        maxWidth?: number;
        onChoiceSelect?: (choiceId: string, lineIndex: number) => void;
        onDialogComplete?: () => void;
        onLineComplete?: (lineIndex: number) => void;
        padding?: number;
        position?: UIAnchor;
        showSpeakerImage?: boolean;
        skipEnabled?: boolean;
        speakerColor?: string;
        style?: CSSProperties;
        textColor?: string;
        textDirection?: TextDirection;
        typewriterSpeed?: number;
        visible?: boolean;
    }

    Hierarchy

    Index

    Properties

    backgroundColor?: string

    CSS-compatible background color string.

    className?: string

    Custom CSS class for the dialogue container.

    continueIndicator?: string

    Character shown when more text is available.

    currentLine?: number

    Index of the line currently being displayed.

    fontFamily?: string

    CSS-compatible font family string.

    fontSize?: number

    Base font size in pixels.

    imagePosition?: "left" | "right"

    Position of the character portrait relative to the text.

    lines?: DialogLine[]

    The full sequence of lines in this dialogue.

    maxWidth?: number

    Maximum width of the dialogue box in pixels.

    onChoiceSelect?: (choiceId: string, lineIndex: number) => void

    Callback fired when the user selects a branching choice.

    onDialogComplete?: () => void

    Callback fired when the final line in the sequence is reached and advanced.

    onLineComplete?: (lineIndex: number) => void

    Callback fired whenever a single line finishes its typewriter animation.

    padding?: number

    Internal container padding in pixels.

    position?: UIAnchor

    Screen corner anchor point.

    showSpeakerImage?: boolean

    Whether to display character portraits.

    skipEnabled?: boolean

    Whether users can skip the typewriter animation.

    speakerColor?: string

    CSS-compatible speaker name color string.

    style?: CSSProperties

    Custom inline CSS styles.

    textColor?: string

    CSS-compatible text color string.

    textDirection?: TextDirection

    Direction of text flow.

    typewriterSpeed?: number

    Characters per second for the typewriter effect.

    visible?: boolean

    Toggles visibility. Default: true.