Table of contents
class UserPreferencesManager {}

Constructor

Constructs a new instance of the UserPreferencesManager class

Parameters
NameDescription

user

TLUser

inferDarkMode

boolean

Properties

systemColorScheme

systemColorScheme: import('@tldraw/state').Atom<'dark' | 'light', unknown>

updateUserPreferences

updateUserPreferences: (userPreferences: Partial<TLUserPreferences>) => void

Methods

getAnimationSpeed()

getAnimationSpeed(): number

getColor()

getColor(): string

getEdgeScrollSpeed()

The speed at which the user can scroll by dragging toward the edge of the screen.

getEdgeScrollSpeed(): number

getId()

getId(): string

getIsDarkMode()

getIsDarkMode(): boolean

getIsDynamicResizeMode()

getIsDynamicResizeMode(): boolean

getIsPasteAtCursorMode()

getIsPasteAtCursorMode(): boolean

getIsSnapMode()

getIsSnapMode(): boolean

getIsWrapMode()

getIsWrapMode(): boolean

getLocale()

getLocale(): string

getName()

getName(): string

getUserPreferences()

getUserPreferences(): {
  animationSpeed: number
  color: string
  colorScheme: 'dark' | 'light' | 'system' | undefined
  id: string
  isDarkMode: boolean
  isDynamicResizeMode: boolean
  isSnapMode: boolean
  isWrapMode: boolean
  locale: string
  name: string
}

TextManagerVec