Docs
API Reference
App State

AppState

⚠️ The application state is unstable and is likely to experience breaking changes.

The internal state of the <Puck> component.

data

The current Data payload being managed by Puck.

ui

The current state of the Puck editor interface.

ParamExampleType
leftSideBarVisiblefalseBoolean
rightSideBarVisiblefalseBoolean
itemSelector{ index: 0, zone: "my-content" }Object
arrayState{}Object
componentList{ typography: { components: [ "HeadingBlock" ] } }Object

ui.leftSideBarVisible

Whether or not the left side bar is visible.


ui.rightSideBarVisible

Whether or not the right side bar is visible.


ui.itemSelector

An object describing which item is selected.

ui.itemSelector.index

The index of the item within the zone.

ui.itemSelector.zone

The zone that the item is defined within. Defaults to main content zone.


ui.arrayState

An object describing the internal state of array items


ui.componentList

An object describing the component list. Similar shape to the categories API

ui.componentList[key].components

Array containing the names of components in this category

ui.componentList[key].title

Title of the category

ui.componentList[key].visible

Whether or not the category is visible in the side bar

ui.componentList[key].expanded

Whether or not the category is expanded in the side bar