BlogRelease notes

tldraw SDK 5.6

Steve Ruiz

We've just landed version 5.6 of the tldraw SDK.

We’ve been continuing with the polishing push we were doing with last month’s release, making everything feel just that little bit cleaner and more satisfying. That includes smarter menus, easier translation, and cleaner commenting interfaces.

There were 150 updates in total. If you really want, you can read every single one of them here. Or check out the highlights below.

Smarter menus

Like a busy restaurant on a Thursday night, our menus would sometimes show options for things that weren’t actually available. Grouping locked shapes, flipping a locked shape, or exporting an empty page, for example.

Now, menus only display actions you can actually perform. Everything else is hidden or grayed out. Custom menus can do the same with the new isAvailable and isEnabled on actions.

Precision undo

We tweaked undo to be more precise; it now undoes only one thing at a time.

Before, if you brush-selected, right-clicked an empty part of the canvas, or nudged shapes with the arrow keys, the next undo would also reverse the edit before the one you wanted.

Plus, you can double-click a frame’s corner or edge to fit it to its content, and undo will put it back exactly as you drew it. Before, hitting undo could delete the frame altogether.

These were more of those rare bugs we’ve been hunting down. Maybe you’ve never noticed them before. But squashing them brings us that little bit closer to perfect.

Translations in the UI

This month, we spent some time thinking about how to better support multiple languages in the canvas interface. We landed on switching every UI string to ICU MessageFormat. So, you can set your canvas UI to your preferred language.

Interface text also adjusts to the situation, so users see “1 shape” or “3 shapes” instead of “3 shape(s)”. Adding your own translated text is simpler, too. Write it in the same place it’s displayed, using defineMessages and F, rather than keeping it in a separate file.

This change has also made the canvas more accessible for people using screen readers. Shape names like “rectangle” or “arrow” are now read aloud in the user’s chosen language, because @tldraw/editor can handle translations as well.

Heads-up: your existing translation overrides still work. If you reworded SDK strings by pointing assetUrls.translations.en at your own file, move that to overrides.translations.en, since English is no longer fetched.

Comment from the context menu

If you've set up comments, you can right-click the canvas and pick Comment to drop one exactly where you clicked. On iOS, the composer no longer needs a second tap before you can type, and clicking the canvas mid-comment now cancels it instead of moving it.

And clicking the canvas mid-comment now closes it instead of moving it to wherever you clicked. Your draft is kept for when you pick the comment tool again.

Whether you’ve set up comments or not, we’d love to hear from you — either with feedback or if we can help you get set up.

Even more!

  • The laser tool gets startScribble(), and no longer crashes when a scribble times out mid-stroke
  • The hinted outline around shapes is a little thinner, at 2px instead of 2.5px
  • Faster store queries, with no allocation per change
  • Allow keyboard navigation (Tab, Ctrl/Cmd+arrow, and the "Move focus to canvas" button) to reach locked shapes again, so keyboard users can select and unlock them
Thanks to all of the developers this month who opened issues or built something awesome with the tldraw SDK. Follow us on Twitter/X or join us on Discord for more discussion and to share your work!

Trusted by these companies

  • AlAI
  • bigpi
  • CADChat
  • Google
  • Replit
  • BlackRock
  • Loveable
  • ClickUp
  • Autodesk
  • Google Stitch
  • Luma
  • Runway
  • SchoolAI
  • Honeycomb
  • Padlet
  • Genio
  • JAM
  • Mobbin
  • Brisk
  • Aries
  • Dirac