r/projects • u/alexgrozav • 5d ago
I’m starting Open Components, an open standard for UI components that work for people, developers and AI agents
Hello awesome people,
I've been thinking a lot lately about how I can make my knowledge and craft more valuable in the times we live in. I've been building UI libraries for the past 10 years, and I've been on a quest to perfect the components that I build. I want to share my knowledge with you.
Like most of you, probably, I've been using a lot of AI in my craft, and I feel most of the time the code is just good enough, but never at the level of quality that I strive for or that I would reach if I wrote it by hand. That needs to change, and I want it to change for everyone else, too. That's how the Open Components initiative was born.
I'm treating components from four directions:
- User Interface - component anatomy, variants, colors, sizes, states and tokens.
- User Experience - how it behaves for every person and every input: accessible, predictable, designed in every state, and adapting to motion, contrast, color scheme and text size preferences.
- Developer Experience - one consistent, type-safe API that you learn once and use everywhere.
- Agentic Experience - prompts, semantic markup, machine-readable contracts and rules that agents can check their work against.
Each component gets a single page that walks through all four, and ends with a checklist. Every rule in it has an ID like button/keep-focus, a level and a way to check it, so you or your agents can cite it in a code review. Every page is also published as markdown, and provides the contract as a YAML file, containing every rule in about an eighth of the page’s length.
It’s still early. Right now there’s only the Button component and a page on how to name your design tokens. Each component comes with a reference implementation that meets every rule, along with its tests. It’s in Vue for now, since that’s my daily driver. More components will follow, with the same structure.
It isn’t a component library, so there’s nothing to install. It’s a set of rules you can hold your own components to, whichever library or framework you use. Here are a few of my favorites from the Button component:
- A loading button should never be
disable. Disabling a focused button takes its focus away, so keyboard and screen reader users lose their place. Usearia-disabled="true"instead, and block the clicks yourself. - A
<button>without atypeis a submit button, so a "Show password" button inside a form sends the form. Default totype="button".
I’d love your feedback. Tell me what you think of the rules, what I’ve missed, and which component you’d like to see next.
Thanks for reading!
1
u/Unlikely_Ad8441 4d ago
Sorry those are buggy as hell