React
Artboards
Selecting which artboard to render at runtime
For more information on creating artboards in the Rive editor, please refer to Artboards.
Was this page helpful?
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Selecting which artboard to render at runtime
export const Simple = () => (
<Rive
src="https://cdn.rive.app/animations/vehicles.riv"
artboard="Truck"
stateMachine="bumpy"
/>
);
// With `useRive` Hook:
export default function Simple() {
const { RiveComponent } = useRive({
src: 'https://cdn.rive.app/animations/vehicles.riv',
artboard: 'Truck',
stateMachine: 'bumpy',
autoplay: true,
});
return <RiveComponent />;
}
Was this page helpful?