Layout Scripts extend the behavior of Node Scripts, giving you programmatic control over Layout components. They let you measure, size, and react to changes in your Layout’s geometry. They are ideal for building custom layout behaviors such as masonry grids, carousels, spacing logic, and more.Documentation Index
Fetch the complete documentation index at: https://rive-accessibility.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Examples
Adding a Layout Script to a Layout
- Add a new Layout to the scene.
- Create a new script and select Layout as the type.
- Add your script as a child of the Layout.
Lifecycle
Layout Scripts add two additional lifecycle functions:measure(self): Vec2D— optionalresize(self, size: Vec2D)— required