Changing default style
Want to set the default value for a property to something other than it's built-in default? In this example we make the size style have small as its default calue.
import { DefaultSizeStyle, Tldraw } from 'tldraw'
import 'tldraw/tldraw.css'
DefaultSizeStyle.setDefaultValue('s')
export default function ChangingDefaultStyleExample() {
return (
<div className="tldraw__editor">
<Tldraw persistenceKey="example" />
</div>
)
}
Is this page helpful?
Prev
Changing default menusNext
Custom UI