TLInstancePageState
See source codeTable of contents
Extends BaseRecord<'instance_page_state', TLInstancePageStateId>.
State that is unique to a particular page within a particular browser tab. This record tracks all page-specific interaction state including selected shapes, editing state, hover state, and other transient UI state that is tied to both a specific page and a specific browser session.
Each combination of page and browser tab has its own TLInstancePageState record.
interface TLInstancePageState
extends BaseRecord<'instance_page_state', TLInstancePageStateId> {}Example
const pageState: TLInstancePageState = {
id: 'instance_page_state:page1',
typeName: 'instance_page_state',
pageId: 'page:page1',
selectedShapeIds: ['shape:rect1', 'shape:circle2'],
hoveredShapeId: 'shape:text3',
editingShapeId: null,
focusedGroupId: null,
}Properties
croppingShapeId
croppingShapeId: null | TLShapeIdeditingShapeId
editingShapeId: null | TLShapeIderasingShapeIds
erasingShapeIds: TLShapeId[]focusedGroupId
focusedGroupId: null | TLShapeIdhintingShapeIds
hintingShapeIds: TLShapeId[]hoveredShapeId
hoveredShapeId: null | TLShapeIdid
readonly
from BaseRecord
readonly id: Idmeta
meta: JsonObjectpageId
selectedShapeIds
selectedShapeIds: TLShapeId[]typeName
readonly
from BaseRecord
readonly typeName: TypeNamePrev
TLInstanceNext
TLInstancePresence