Note resizing

The editor's options include alternative resizing behavior for note shapes. Set options.noteShapeResizeMode to either none for the default behavior or scale to allow a user to scale the note.

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

// Configure the note shape util to allow scaling to resize
const shapeUtils = [NoteShapeUtil.configure({ resizeMode: 'scale' })]

export default function ResizeNoteExample() {
	return (
		<>
			<div className="tldraw__editor">
				{/* pass the configured shape utils to the editor */}
				<Tldraw persistenceKey="resize-note" shapeUtils={shapeUtils}></Tldraw>
			</div>
		</>
	)
}
Is this page helpful?
Prev
Layout constraints (bindings)
Next
Pin (bindings)
hi

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