Grains.js

Grains.js

Reactive states library for HTML

11 followers

Grains.js is a tiny, reactive state management library designed for HTML. It lets you create isolated state containers directly within your HTML using custom attributes, eliminating the need for a build step or complex setup.
Grains.js gallery image
Grains.js gallery image
Grains.js gallery image
Grains.js gallery image
Grains.js gallery image
Free
Launch Team / Built With
Universal-3 Pro by AssemblyAI
Universal-3 Pro by AssemblyAI
The first promptable speech model for production
Promoted

What do you think? …

Marko
Maker
📌
I'm excited to share Grains.js, a tiny reactive state management library for the front-end. It manages state in your HTML using custom attributes, with support for essential form elements, and it's already quite powerful. I'm developing additional features, including support for more form elements like file uploads. Please check the roadmap in the readme and feel free to make suggestions. What makes Grains.js unique is that I actually built most of it using AI! It was a challenging month-long experiment for me in leveraging AI for frontend development, and I'm eager to hear your feedback. Grains.js provides a super simple way to manage state directly in your HTML using custom attributes. No virtual DOM. It's lightweight, has no dependencies, and requires zero build steps – just include it with the script tag and you're ready to go. Perfect for small to medium-sized projects where you need reactive UI without the overhead. I'm particularly proud of the clean and intuitive API, and I hope you find it as easy to use as I did to (mostly) build it! Give it a try and let me know what you think. I'm looking forward to your comments and suggestions!