HNHacker News
TopNewBestAskShowJobs

steveruizok

292 karma · joined September 19, 2021

Founder tldraw.com @steveruizok on Twitter
submissionscomments
steveruizok··on Tldraw – a tiny little drawing app
Thanks! I hadn’t considered that but it would definitely be possible. I’m considering having a “view only” version of the editor, and this could be one of its options.
steveruizok··on Tldraw – a tiny little drawing app
There are competing conventions for this in different kinds of apps. In the end, I went with the design app convention.

If you want it to stick with the same shape, double click the shape in the toolbar!

steveruizok··on Tldraw – a tiny little drawing app
Yep, these all come from events.
steveruizok··on Tldraw – a tiny little drawing app
Yep, I'm a big fan of Excalidraw and am a contributor there too. I also re-implemented the pen tool in Excalidraw to use my digital ink library, perfect freehand (https://github.com/steveruizok/perfect-freehand), which is used extensively in tldraw.

tldraw is a separate project. The big difference is that Excalidraw renders to HTML canvas while tldraw renders to a regular DOM tree. There's a trade off: canvas can have better performance on some machines, while my approach with tldraw makes it easier to implement more complex embedded content. I wouldn't expect any changes, so use whichever you prefer!

steveruizok··on Tldraw – a tiny little drawing app
Thanks! There are some size options in the menu at the top right.

And yeah, I've spent so much time thinking about how to do an eraser right! I think it will need to wait until the next version of my digital ink library. https://twitter.com/steveruizok/status/1458712896620404742

steveruizok··on Tldraw – a tiny little drawing app
I'm a big fan of Excalidraw! And a contributor, too, I implemented the pen tool in Excalidraw. Both apps use my library perfect-freehand (https://github.com/steveruizok/perfect-freehand) for the digital ink.

The main difference between the two is that Excalidraw renders to HTML canvas, while tldraw renders to a regular DOM tree. There are tradeoffs but this lets us make things like sticky notes or other types of complex embedded content without too much difficulty.

steveruizok··on Tldraw – a tiny little drawing app
Export is coming, still working out a strategy there. It's a bit trickier because we're not using the HMTL Canvas API, but instead rendering regular DOM elements. Might need to be something on the server side, similar to what I've done before with dynamic social media images.
steveruizok··on Tldraw – a tiny little drawing app
Right on, I'm hoping to put in some more options for the freehand drawing tool. That part of the app is using my other project, perfect-freehand (https://perfect-freehand-example.vercel.app/), which supports a ton of options. It'd just be a matter of exposing those through the UI.

At the moment it's pretty tied to React, however the "app" itself—the big state machine that responds to events—is independent. It would take some effort to make it work with other libraries but it could be done.

steveruizok··on Tldraw – a tiny little drawing app
Sure, this is public info on my profile: https://github.com/sponsors/steveruizok.

I'm up to 211 sponsors, about $1700 per month.

Many of those sponsors are one-time donations. At the beginning, I set the minimum one-time donation to $1; once I reached 100 sponsors, I bumped the minimum up to $10.

The larger sponsors come mostly from digital ink library perfect-freehand (https://github.com/steveruizok/perfect-freehand), also MIT licensed, which is being used by many products such as Next.js live, Milanote, Clover, etc.

steveruizok··on Tldraw – a tiny little drawing app
Are you on Windows? The context menu seems to be behaving strangely for PCs users, probably a different set of default styles than I saw while developing. :/ Working on it!

https://github.com/tldraw/tldraw/issues/243

steveruizok··on Tldraw – a tiny little drawing app
I originally bought the domain tldraw.com for a different project, Telestrator (https://github.com/steveruizok/telestrator), which is an app for drawing on top of your screen during a call / stream. The app is pretty nice if you're on macOS, but I never used the domain.

When this project kicked off, I wanted something that could be saved alongside code as version-controlled documentation, and that was the first time I noticed the "tldr" in "tldraw". So I just used tldraw.com and stole the name!

steveruizok··on Tldraw – a tiny little drawing app
Happy to answer any questions about this. If you're considering this kind of approach for a new project, I'd really recommend it, especially for projects that you plan to release in stages. My strategy with tldraw was to pair the sponsorware'd app with steady content about the its development. It worked pretty well!
steveruizok··on Tldraw – a tiny little drawing app
Good call! Pushing a fix for that now.
steveruizok··on Tldraw – a tiny little drawing app
I've considered adding a list, for sure. You don't often see layers lists for these kinds of minimal whiteboarding apps, but personally I reach for the list every time I use tldraw. :/
steveruizok··on Tldraw – a tiny little drawing app
We do have that! You can right click and select commands like Move > Send to Back.
steveruizok··on Tldraw – a tiny little drawing app
Hey, author here! Glad folks are enjoying this.

A few notes:

- I post a _lot_ about tldraw on Twitter. If you're curious about how this came together, or want to follow along as we ship new features, check out my timeline (https://twitter.com/steveruizok).

- The whole tldraw project is MIT licensed and open source (https://github.com/tldraw). And it's still in development! If you'd like to contribute, join the Discord channel (https://discord.gg/SBBEVCA4PG) or drop by the repo (https://github.com/tldraw/tldraw).

- The multiplayer is using a pre-release version of Liveblocks (https://liveblocks.io/)—and honestly isn't using it in a very clever way—and so can have some desync issues. Consider this part of the app an early beta.

- We also ship a Visual Studio Code extension that lets you use tldraw inside of VS Code! (https://marketplace.visualstudio.com/items?itemName=tldraw-o...)

A little more about the project itself:

The tldraw project has a few different layers.

At the bottom, there is a renderer named @tldraw/core (https://github.com/tldraw/core) that is essentially a "put React components on a canvas UI" engine. You give it a data model along with a set of utilities to interpret that data model. Simple but very fast, very flexible, and packed with helpers for building these kinds of apps. It's already being used for some pretty ambitious projects apart from tldraw itself.

The main library, @tldraw/tldraw (https://github.com/tldraw/core), exports the whole tldraw "app" as a React component named <Tldraw/>. This component can be embedded in any React project. It can be controlled either by props or by its own API (ie `app.selectAll().duplicate()`).

The website is a very thin Next.js app that embeds the <Tldraw/> component.

There are also a few other libraries: @tldraw/vec for the vector math and @tldraw/intersect for intersections. If you like to work on these kinds of projects, definitely bookmark those libraries! They contain a lot of useful code.

As for its development, I've taken off a few months between jobs to work on this full time. Until now, the site has been accessible only to my Github sponsors, but it's now free and open to everyone. If If you'd like to support the project's continued development, you can sponsor me here: https://github.com/sponsors/steveruizok.

I'll answer questions here but if you want to contact me directly, my DMs are open @steveruizok.

← PreviousPage 3 of 3