InstancePageStateRecordType

See source code

The RecordType definition for TLInstancePageState records. Defines validation, scope, and default properties for instance page state records.

Instance page states are scoped to the session level, meaning they are specific to a browser tab and don't persist across sessions or sync in collaborative environments.

InstancePageStateRecordType: import('@tldraw/store').RecordType<
  TLInstancePageState,
  'pageId'
>

Example

const pageState = InstancePageStateRecordType.create({
  id: 'instance_page_state:page1',
  pageId: 'page:page1',
  selectedShapeIds: ['shape:rect1'],
})
Prev
imageShapeProps
Next
InstancePresenceRecordType