Setting Up a Component for Stateful Use
Before a component can be used statefully, its artboard needs a view model with the properties you want to expose.- Create or open the artboard you want to use as a component.
- Add a view model and bind the relevant properties to elements in the artboard (for example, a label string bound to a text run, or a background color bound to a fill).
- Mark the artboard as a component using the component toggle in the inspector, or press Shift + N.
- In the inspector, find the Properties section. Click + to add the view model properties you want to expose.
- For each property, choose whether it’s an Input or an Output:
- Input — the value can be set on each instance when nested as a stateful component.
- Output — the value is read-only when nested; it reports back to the parent.