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

# Text

> ⚠️ DEPRECATED: Use Data Binding instead of direct text run manipulation at runtime

> [!WARNING]
>
> **DEPRECATION NOTICE:** This entire page documents the legacy Text
> manipulation system. **For new projects:** Use [Data Binding](https://rive.app/docs/runtimes/flutter/data-binding.md) instead. **For existing projects:** Plan to
> migrate from direct text run manipulation to Data Binding as soon as possible.

For more information on designing and animating Text, please refer to the editor's text section:

> [card] [Text](https://rive.app/docs/editor/text/text-overview.md)
>
> Information on designing and animating Text

## Read/update Text Runs at runtime

> [!WARNING]
>
> **⚠️ LEGACY CONTENT WARNING:** The following sections document the deprecated
> Text manipulation system. **This content is provided for legacy support
> only.** New implementations should use [Data Binding](https://rive.app/docs/runtimes/flutter/data-binding.md).

If you intend to update a **text run** at runtime it's important to manually enter a *unique name* for the run in the editor:

![Image](https://mintcdn.com/rive/QEBBdwwFJOiq_hKR/images/runtimes/3114789e-e298-458e-8d9b-00ca71db658d.webp?fit=max\&auto=format\&n=QEBBdwwFJOiq_hKR\&q=85\&s=016fd8859f1b8906aa175d6edd0b6b65)

And then export the name: **right-click** and select **Export name**

![Image](https://mintcdn.com/rive/QEBBdwwFJOiq_hKR/images/runtimes/b729291c-f915-4ce0-b2fa-f6d6a742141c.webp?fit=max\&auto=format\&n=QEBBdwwFJOiq_hKR\&q=85\&s=7b3b4b6b6370896ef96b01f5d9c2861e)

You can identify an exported component if it's surrounded by square brackets. This makes it possible for the run to be "discoverable" at runtime by its name. For more information, see [Exporting for Runtime](https://rive.app/docs/editor/exporting/exporting-for-runtime.md).

> [!WARNING]
>
> **If the name is not set manually in the editor the name will not be part of
> the exported *.riv* (to reduce file size).**

> [!NOTE]
>
> Text runs can also be updated on components at runtime, see [Read/Update
> Nested Text Runs at Runtime](#read-update-nested-text-runs-at-runtime) below.

Get/set the text run value on an `Artboard` instance.

> [!TIP]
>
> We recommend using [Data Binding](https://rive.app/docs/editor/data-binding/overview.md) instead to update text at runtime.

```dart Get/Set Text Run Value theme={null}
final controller = RiveWidgetController(riveFile);
final artboard = controller.artboard;

// Get a text run value
artboard.getText(value)
// Optional path parameter to get a text run value at a component instance level
artboard.getText(value, path: path)

// Set a text run value
artboard.setText(value)
// Optional path parameter to set a text run value at a component instance level
artboard.setText(value, path: path)
```

## Read/update nested Text Runs at runtime

> [!WARNING]
>
> **⚠️ DEPRECATED FEATURE:** Nested Text Runs are part of the legacy Text
> manipulation system. **Use Data Binding instead** for controlling component
> text properties at runtime.

It's possible to set nested text runs at runtime—text that is not on the main artboard but on a [Component](https://rive.app/docs/editor/fundamentals/components.md). To set a nested text run, you'll need to take note of the path where the input exists at an artboard level.

For example, to get/set the text run named **button\_text** on the **Button** artboard, you need to provide the correct path.

![Setting Nested Text Runs ](https://mintcdn.com/rive/QEBBdwwFJOiq_hKR/images/runtimes/51848b07-5a82-4fc9-ab3f-0505336fcce3.webp?fit=max\&auto=format\&n=QEBBdwwFJOiq_hKR\&q=85\&s=c8ce539dc6a4608a1a9306d84d22d46a)

*Setting Nested Text Runs*

The artboard names here are:

* **Main** -> **NestedArtboard** -> **Button**

![Image](https://mintcdn.com/rive/QEBBdwwFJOiq_hKR/images/runtimes/fc5b5be2-546f-44d0-ad85-f7a8da64973b.webp?fit=max\&auto=format\&n=QEBBdwwFJOiq_hKR\&q=85\&s=cd27346bb83269fef885a9f8979e3953)

However, the path is determined based on the names set in the hierarchy:

* **ArtboardWithUniqueName** -> **ButtonWithUniqueName**

The path is then: `ArtboardWithUniqueName/ButtonWithUniqueName`

> [!WARNING]
>
> Be sure to mark the components and text runs as exported.
>
> ![Export component
> name](https://mintcdn.com/rive/QEBBdwwFJOiq_hKR/images/runtimes/618066cd-2909-420e-b94b-d3eb920fe389.webp?fit=max\&auto=format\&n=QEBBdwwFJOiq_hKR\&q=85\&s=56cb1192d2293554f855737775f6b2e9) *Export
> component name*

> [!WARNING]
>
> Do not use "/" in the name for your components, as that will break the search
> functionality at runtime.

## Examples

Get/set a nested text run value on an `Artboard` instance.

> [!TIP]
>
> We recommend using [Data Binding](https://rive.app/docs/editor/data-binding/overview.md) instead to update text at runtime.

```dart Get/Set Text Run Value theme={null}
final controller = RiveWidgetController(riveFile);
final artboard = controller.artboard;

//Use the path parameter to get a text run value at a component instance level
artboard.getText(value, path: path)

// Use the path parameter to set a text run value at a component instance level
artboard.setText(value, path: path)
```

### Semantics for accessibility

Rive now supports screen readers through semantics.

See the [Semantics](https://rive.app/docs/editor/accessibility/semantics.md) documentation for current guidance.

### Additional resources:

* [Accessible web animations: ARIA live regions](https://rive.app/blog/accesible-web-animations-aria-live-regions?utm_source=docs\&utm_medium=content)
