Skip to main content
Components are reusable artboards. Create a component once, then use customized instances of it throughout your Rive file. Changes made to the source component are reflected across all of its instances. You can use components in several ways: Components can include their own graphics, animations, state machines, and data, allowing you to build complex experiences from smaller, reusable pieces.

Creating a component

Converting Artboards to components

Any artboard can be converted into a reusable component.
1
Select an artboard.
2
In the Inspector, select the Component icon or press Shift + N.
You can identify components by their purple artboard title on the stage. Convert an artboard to a component
Artboards that aren’t components aren’t exported with your Rive file. This can be useful for artboards used only while authoring, such as tests or reference artboards.

Converting objects to components

You can select one or more objects on an artboard and convert them into a new component.
1
Select the object or objects you want to convert.
2
Right-click the selection and select Create Component.
Rive creates a new component containing the selected objects and replaces the original selection with an instance of that component. Create a new component from an element inside the artboard Animations and State Machines If the selected objects are animated by a timeline on the original artboard, the relevant keys are removed from that timeline and copied to a new timeline inside the component. State machines aren’t copied to the new component. State machines can depend on objects, animations, data, and other elements outside the selection, so you’ll need to create a new state machine inside the component. Data bindings are copied to the new component, but their view models are not.

Troubleshooting

Components are self-contained, so Rive can’t create a component if the selection depends on objects outside of it. Make sure you include any required dependencies in your selection. For example, a draw order dependency that crosses the new component’s boundary will prevent the component from being created and display the “Can’t create component” error: “These dependencies point across the new component’s boundary and would break.” Can't create component error caused by a dependency crossing the component boundary

Placing components

Use the Component Tool, formerly known as the Nested Artboard Tool, to place instances of components on the stage. Select the tool from the toolbar or press N. Click anywhere on the stage to choose from the available components and place an instance at that location. Placing a component instance by clicking stage with the Component Tool and choosing from the menu of available components
If an artboard doesn’t appear in the component menu, make sure you’ve converted it to a component.
Alternatively, use the dropdown next to the Component Tool to choose a component before placing it. Placing a component instance by clicking the Component Tool dropdown, selecting a component, and clicking the stage To place an instance before you’ve picked a component, select Create Placeholder from the component menu. Your next click on the stage places an empty component instance. Set its Source later. The component menu follows the sort mode used in the Assets panel:
  • Custom displays components as they’re organized in the Assets panel.
  • Source/Type groups components by their source. This is particularly useful when working with Libraries.
Sort assets by Custom

Generating an Artboard

To get a new Artboard with an instance of a component already inside it, right-click the component in the Assets panel and select Generate Artboard.

Editing components

Double-click a component instance to open its source component. Changes you make to the source component are reflected in all of its instances, while properties configured on individual instances remain unchanged. Double click to edit a component

Bitmap cache

A bitmap cache draws a component’s instances from a cached image instead of redrawing their vectors. Use it for components with complex vectors that don’t change. Any change to the component’s contents forces the image to redraw, so a cache helps most with static content. To add a bitmap cache, select the component’s artboard and click + next to Bitmap Cache in the Inspector. The cache applies to every instance of the component. To remove it, click the delete button next to Bitmap Cache.
  • Resolution sets how sharp the cached image is, as a multiple of the size the component is drawn at on screen. 1x is the default, and 2x doubles each dimension, using approximately four times as many pixels before the size cap. Higher values look crisper but use more memory. The image is capped at 2048 pixels per side.
  • On / Off turns the cache on or off without removing it. You can key or data bind it, for example to cache only while the component isn’t changing.

Component instance properties

Select a component instance to configure its properties in the Inspector. These properties control the data, animation, source, layout, and other behavior of that specific instance without changing the source component. Component properties in the sidebar

Origin override

By default, a component instance uses the origin set on its component’s artboard. To give one instance a different origin, click + next to Position in the instance’s Transform section. An Origin row appears below Position, starting at the artboard’s current origin. Set X and Y as a percentage of the instance’s size:
  • 0% is the left or top edge.
  • 50% is the center.
  • 100% is the right or bottom edge.
Click - next to Origin to remove the override and go back to the artboard’s origin.

Source

Source determines which component is displayed by the instance. Select a component directly, or data bind the source to change the component dynamically. A placeholder instance, created with Create Placeholder in the component menu, starts with no source. Choose a component or data bind the source to fill it. Learn more about Data Binding.

Data

Configure the data used by a component instance. Stateful Components If the component is a Stateful Component, you can set its exposed properties directly on the component instance. Model Use Model to set the view model instance used by the component.
  • Inherit uses a compatible view model instance from the closest parent.
  • To specify an instance, add a View Model property to the parent’s view model and assign an instance to it. You can then select that property as the component’s Model.
Learn more about View Models and Instances.

Mode

Mode determines how the component instance sizes and responds to the space available from its parent. See Component Sizing for more information about sizing modes and their properties.

Deform

A component instance with Mode set to Node can take a Mesh or an N-Slice, the same way an image can. Use this to bind a component to bones, animate its vertices, or slice it.

Animations

Choose the animations that play on a component instance. In most cases, you’ll want to select a state machine, but you can also add one or more timeline animations. State Machine Select a state machine to run on the component instance. You can adjust its playback Speed and enable Quantize. Timeline Animations Add timeline animations to play on their own, alongside a state machine, or layered with other animations. When adding a timeline animation, choose between Simple and Remap. Simple plays the timeline normally and provides the following controls:
  • Mix controls how much the animation contributes when mixed with other animations.
  • Speed controls the animation’s playback speed.
  • Playing controls whether the animation is playing.
Remap lets you control the position of the animation’s playhead directly:
  • Mix controls how much the animation contributes when mixed with other animations.
  • Time controls the animation’s playhead as a percentage, where 0% is the beginning and 100% is the end.