ToolsLightweight
Rive
Designer-made animation played by a small runtime.
A tool where a designer animates characters and icons on a timeline, and a small player runs them on the page. Buttons that react, mascots that blink, icons that morph. The animation is made in the Rive editor; code only wires up the triggers.
- Breaks when
- needs the Rive editor; not promptable from scratchruntime adds weight
- Also called
- Rive runtime, .riv
Prompts
Wire a state machine to app state
Using @rive-app/react-canvas, load /hero.riv with state machine "Main". Bind three inputs: boolean "hover" from onPointerEnter/Leave, number "progress" (0–100) from a scroll ratio, and trigger "confirm" from a button. Size the canvas to its container with Layout Fit.Contain, and pause the runtime when the element leaves the viewport.
Loading state without a spinner
Replace a spinner with a Rive animation: mount /loader.riv, autoplay the "idle" state machine; when the fetch resolves fire the "done" trigger, wait for the "complete" event, then remove the element. Preload the .riv with <link rel="preload" as="fetch">.
Brief for the Rive file
Write the design brief for a Rive file a developer will receive: artboard 400 × 400, state machine "Toggle" with a boolean input "on", states off → on → off with 220 ms transitions and slight overshoot, plus an "idle" breathing loop. List the exact input names so code and file agree.
Related
Resources · 1
- Riverive_appsite · demoMay 10, 2026