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>
)
}
Prev
Custom optionsNext
Inset editor