InstancePresenceRecordType

See source code

The RecordType definition for TLInstancePresence records. Defines validation, scope, and default properties for instance presence records.

Instance presence records are scoped to the presence level, meaning they represent real-time collaborative state that is ephemeral and tied to active user sessions.

InstancePresenceRecordType: import('@tldraw/store').RecordType<
  TLInstancePresence,
  'currentPageId' | 'userId' | 'userName'
>

Example

const presence = InstancePresenceRecordType.create({
  id: 'instance_presence:user1',
  userId: 'user1',
  userName: 'Alice',
  color: '#FF6B6B',
  currentPageId: 'page:main',
})
Prev
InstancePageStateRecordType
Next
LANGUAGES