About Lightview
A lighter way to build.
"The view is beautiful from here."
Genesis
It all started with a mix of admiration and frustration. I liked Bau, HTMX, and Juris. They were elegant, but they were also opinionated—they forced a choice.
I didn't want to choose. I wanted a framework that supported all approaches. None of them quite hit the mark on their own. Plus, I wanted something none provided, template literals right inside HTML. I also wanted a rich component library (with charts!) without having to build everything from scratch available as both JavaScript and custom HTML elements.
I wanted a framework that was easy to use and learn, as close to regular HTML and JavaScript as possible, something that felt more like regular HTML than even HTMX does. This would also require thorough and fully interactive documentation accessible via direct URLs and an SPA like experience. This manadated a router with at least partial "automatic" SSR—where code could execute and replace itself on the server with a simple DOM emulation and "have-your-cake-and-eat-it-too" single page apps that are SEO enabled without any extra work.
In today's age, the ability of an LLM to generate cohensive applications using the library is also important to me. If figured that if an LLM generated it and it followed conventional patterns, it will be able to use it well and perhaps generate a little less slop.
So, I decided to run an experiment. I told Claude Opus 4.5 via Google Antigravity to "create me the combo of HTMX, Bau, and Juris with no special attribute names plus HTML template literals, and an SPA router. And, give me a UI component library like Bau's with automatic custom elment creation but don't build it from scratch. Finally, make it possible to create SEO enabled apps with no extra work" I also provied a few examples of the kind of code I wanted to write using the library.
Naturally, it took a little iterating, but the basic framework was in place after just a few hours of working with both Claude Opus 4.5 and Gemini 3 Pro. I then asked for an extensive interactive website for documenting and promoting Lightview that also used Lightview, despsite the fact that in the age of LLM code generation the need for extensive documentation websites is limited. This took a lot more work, 3 weeks in fact. Very little of this time was spent addressing issues with or enhancing Ligntview. Most of it was spent adding, debugginng and testing all the UI components. The LLM would get locked in on a particular approach that worked form simple components bu no more complex ones. But, that is a story for another time. Here we are 3 weeks later with about 2,000 lines of code for Lightview as a whole across three files, 25,000 lines of component code, and 30,000 lines of documentation.
The resulting Lightview 2.0 library is a replacement for an experiment I ran 4 years ago to create a library with remote state storage and extended type declarations for state management. Although Lightview 2.0 drops some of the features of Lightview v1.0 and is not syntax compatible, it brings together the features I craved without locking me into a single paradigm. I hope you like it.
Design Principles
"My opinion, don't be opinionated!"
🪶 Keep It Light
Life's too short for heavy frameworks. Although Lightview is not tiny (core is 8K), I tried to keep it lean and modular so your apps stay fast.
🚀 No Build Step
Drop in a script tag and go. Instant gratification. Your bundler can take the day off.
🎨 Your Way
Four syntaxes, one system. Incremental adoption by enhancing just the HTML you want. Pick what
feels right. See the function enhance in the API docs.
😊 Have Fun
Coding should spark joy. Simple API, clear and interactive docs, helpful errors. Built for humans who like to smile and LLMs that need structure (so humans don't cry about slop).
Credits & Inspiration
Lightview stands on the shoulders of giants. Big thanks to:
- Bau.js — The elegant tagged template API
- HTMX — Hypermedia as the engine of application state
- Juris.js — Simplicity and progressive enhancement
License
Lightview is open source software licensed under the MIT License.
Free to use, modify, and distribute. Go forth and build light things. ✨
Ready to lighten up?
Enlighten Your UI