Skip to content

Expose artboard layout mode (and layout properties) via the Artboard API #418

@isaganttus

Description

@isaganttus

Feature request

What

Add a way to read an artboard's layout mode and related layout properties through the Artboard class in the low-level API (@rive-app/canvas-advanced).

Why

The layout mode is stored in the .riv binary but is currently not surfaced through any runtime API. The existing Artboard prototype exposes rendering-focused properties (bounds, frameOrigin, width, height, etc.) but nothing related to layout.

For tooling use cases — such as metadata inspection, documentation generators, or design-system integration scripts — it would be useful to read layout mode without having to parse the .riv binary format manually.

What I tried

I enumerated all properties on rive.Artboard.prototype at runtime using @rive-app/canvas-advanced and confirmed there is no layoutMode, layout, or any layout-related property exposed:

advance, animationByIndex, animationByName, animationCount,
bindViewModelInstance, bone, bounds, buildFocusTreeWithParent,
constructor, didChange, draw, eventByIndex, eventCount,
frameOrigin, hasAudio, height, inputByPath, name, node,
resetArtboardSize, rootBone, stateMachineByIndex,
stateMachineByName, stateMachineCount, textByPath, textRun,
textValueRunByIndex, textValueRunCount, transformComponent,
volume, width

Requested API (suggestion)

// On the Artboard class:
get layoutMode(): LayoutMode; // e.g. an enum: None | Flex | ...

A fuller set of properties (alignment, justification, wrap, padding, gap) would be even better, but layoutMode alone would be a good start.

Context

  • Runtime: @rive-app/canvas-advanced
  • Environment: Node.js (but the gap exists in browser too — layout is just never surfaced)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions