Strata - v1.4.10
    Preparing search index...

    Variable DialogBoxConst

    DialogBox: ForwardRefExoticComponent<
        DialogBoxProps & RefAttributes<DialogBoxRef>,
    > = ...

    Advanced Game Dialogue System.

    A highly-functional, RPG-ready dialogue system that bridges the gap between your game's narrative and the player. Includes typewriter effects, character portraits, branching choices, and automatic RTL detection for global localization.

    Key Features:

    • Narrative Flow: Typewriter animation with skip and auto-advance support.
    • Portraits: Customizable speaker images with flexible positioning.
    • Branching: Interactive choices with conditional visibility.
    • Accessibility: Keyboard support (Space/Enter) and ARIA attributes.
    // Complex branching dialogue example
    <DialogBox
    lines={[
    {
    speaker: 'Gatekeeper',
    text: 'Halt! Who goes there?',
    speakerImage: '/portraits/guard.png'
    },
    {
    speaker: 'Gatekeeper',
    text: 'The path ahead is dangerous. Are you prepared?',
    choices: [
    { id: 'yes', text: 'I am ready.' },
    { id: 'no', text: 'Not yet...', consequence: 'exit' }
    ]
    }
    ]}
    onChoiceSelect={(id) => console.log(`Player chose: ${id}`)}
    typewriterSpeed={40}
    />