v0.3.0 — Text Run Support
@grandgular/rive-angular v0.3.0
Feature release adding full Rive Text Run support with declarative and imperative APIs, matching the official @rive-app/canvas SDK.
🎉 What's New
Declarative Text Runs
📝 textRuns Input — New reactive input for template-driven text updates. Keys present in the input are controlled — the input is the source of truth.
<rive-canvas
src="assets/hello.riv"
[textRuns]="{ greeting: userName(), subtitle: 'Welcome' }"
/>Imperative Text Runs
🔧 getTextRunValue() / setTextRunValue() — Read and write text run values programmatically for keys not managed by the textRuns input (uncontrolled keys).
riveRef = viewChild.required(RiveCanvasComponent);
const value = this.riveRef().getTextRunValue('greeting');
this.riveRef().setTextRunValue('dynamicText', 'New value');Nested Artboard Text Runs
🪆 getTextRunValueAtPath() / setTextRunValueAtPath() — Access text runs inside nested artboards and components.
this.riveRef().setTextRunValueAtPath('button_text', 'Click Me', 'NestedArtboard/Button');Controlled vs Uncontrolled Semantics
⚖️ React-inspired pattern — Keys in textRuns input are controlled (input wins on every update). Keys outside are uncontrolled (managed imperatively). Calling setTextRunValue() on a controlled key logs a warning in debug mode.
Error Handling
🏷️ RIVE_205 Error Code — New TextRunNotFound validation error emitted through loadError output when a text run name doesn't exist in the animation file.
📐 API Compatibility
All four text run methods are a 1:1 match with the official @rive-app/canvas ^2.35.0 SDK:
| Method | Signature |
|---|---|
getTextRunValue |
(textRunName: string): string | undefined |
setTextRunValue |
(textRunName: string, textRunValue: string): void |
getTextRunValueAtPath |
(textRunName: string, path: string): string | undefined |
setTextRunValueAtPath |
(textRunName: string, textRunValue: string, path: string): void |
✅ No Breaking Changes
textRunsinput is optional — existing templates are unaffected.- All new methods are purely additive.
- No existing API signatures changed.
📚 Documentation
- Updated README with declarative, imperative, and nested text run examples.
- Updated error codes table with
RIVE_205. - Updated API reference table with all four new methods.
- See CHANGELOG.md for complete details.
🙏 Thanks
All 59 tests passing (13 new tests for text run scenarios). Production-ready.