Infer dark mode

When the Tldraw component's inferDarkMode is true, the editor will infer its initial theme based on the user's system preferences, if available. You can toggle the dark mode by pressing Command + /.

import { Tldraw } from 'tldraw'
import 'tldraw/tldraw.css'

export default function InferDarkModeExample() {
	return (
		<div className="tldraw__editor">
			<Tldraw inferDarkMode />
		</div>
	)
}
Is this page helpful?
Prev
Custom paste
Next
Inset editor
hi

We use cookies on this website.
Learn more in our Cookie Policy.