> ## Documentation Index
> Fetch the complete documentation index at: https://docs.borntocraftstudio.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Spoken Dialogue

> Floating speech bubble.

The `textdisplay_spoken` entry renders a single line of dialogue as a floating 3D entity, usually above an NPC's head.

## Configuration

<ResponseField name="text" type="String" required>
  The dialogue text.
</ResponseField>

<ResponseField name="speaker" type="Ref<SpeakerEntry>">
  The entity speaking. Determines the location and name tag.
</ResponseField>

<ResponseField name="duration" type="Duration" default="0s">
  Typing animation duration.
</ResponseField>

<ResponseField name="position" type="Var<Position>">
  Optional override for text position if no speaker is defined.
</ResponseField>

## Styling

<ResponseField name="scale" type="Double" default="1.0">
  Text size multiplier.
</ResponseField>

<ResponseField name="billboard" type="Boolean" default="true">
  If true, text always faces the player.
</ResponseField>

<ResponseField name="backgroundColor" type="Color" default="Black">
  Background color of the text box.
</ResponseField>

<ResponseField name="textOpacity" type="Double" default="1.0">
  Opacity of the text (0.0 - 1.0).
</ResponseField>

<ResponseField name="viewRange" type="Double" default="64.0">
  Maximum distance at which the text is visible.
</ResponseField>

### Advanced Colors

<ResponseField name="speakerBackgroundColor" type="Color">
  Color behind the speaker's name.
</ResponseField>

<ResponseField name="textBackgroundColor" type="Color">
  Color behind the main text body.
</ResponseField>

<ResponseField name="instructionBackgroundColor" type="Color">
  Color behind instruction text (e.g. "Space to continue").
</ResponseField>

<CodeGroup>
  ```yaml Example theme={null}
  dialogue:
    type: textdisplay_spoken
    text: "Can you hear me?"
    speaker: "guide_npc"
    backgroundColor: "#00000088"
  ```
</CodeGroup>
