logoalt Hacker News

stopachkalast Thursday at 11:36 PM1 replyview on HN

The interactive demos are beautiful! Is there a library you used to build it?


Replies

jakelazaroffyesterday at 12:01 AM

Thank you! The site as a whole is built with Astro and the demos are “islands of interactivity” built with React.

The demos are really running Yjs under the hood — each “client” has its own document, and when the user clicks I set a timeout to simulate the latency and then manually merge the documents into each other. (There’s a third document too for the timeline in the center.)

Other than that, I’m using dnd kit [1] for the drag and drop functionality in the todos demo, Motion [2] for the animations and CodeMirror [3] for the text editor.

[1] https://dndkit.com

[2] https://motion.dev

[3] https://codemirror.net

show 2 replies