← Back to context

Comment by nananana9

2 hours ago

This is as far as I got in 30 minutes: https://ghostdisk.github.io/ui https://github.com/ghostdisk/ui

Text glyphs/UI images are all in 1 atlas, you can render the entire UI as 1 draw call and only re-render when something changes. I haven't checked if Claude chose to re-render the whole screen or just part of it, you can design it either way.

Layout can be as simple or as complex as you want it to be - this example does both flex and grid-style layuts, flex supports start/end/center/stretch on both main/cross axes, as well as a flex prop.

For the API you can either go immediate mode or retained - this one is retained since explaining to Claude how to do the IM version properly would take longer than doing it myself, but the layout algorithm can be the same regardless of which route you go for the user-level API.

You only need scrolling/overflow on top of that and this is enough for the majority of widgets you may need.

My point is none of this stuff is hard. This is 700 lines of Claude code, if you write it yourself it would be 400, and will have better performance characteristics than most UI libraries out there.

Edit: Added scrolling too, there's a 100K scrollable virtual list in the demo. Again - this stuff is not hard.