Nitro Kit for Rails
Nitro Kit
Nitro Kit is a purposefully modest set of Phlex UI components for Rails, composed directly in Ruby. This is its gallery: the exhaustive test bed and the reference a coding agent reads.
What this is
Every gem-owned component appears here with every meaningful permutation, state, and edge, driven by the same catalog the test suite runs against. It is boring on purpose: complete beats curated, because this is what proves the system works.
Human teaching — installation, guides, the theme Customizer, and Nitro Kit Pro — lives on the documentation site at nitrokit.dev. The gallery enumerates and proves; the site curates and teaches.
Who each surface serves
- The agent guide is the machine entry point: the composition model, the system rules, and why the API refuses what it refuses. It is also served as text at /llms.txt.
- The human guide explains how to read a component page, what the compositions are, and how theming works.
- Component pages enumerate one component and are self-contained: examples with copyable Ruby, then that component's contract, its patterns, and the system rules.
- Compositions are executable composition tests — realistic screens built only from Nitro components, exercised across their real states.
The idea
Nitro Kit owns the reusable parts: component markup, the CSS, and a little behavior where the browser needs help. Your app themes it with CSS custom properties, composes or subclasses the pieces, and keeps every product decision to itself.
- Compose in Ruby. APIs are explicit and validated, so a wrong option tells you instead of rendering something odd.
- Prefer the platform. Rails, native HTML and CSS, and browser features come before custom JavaScript.
- Keep ownership clear. Nitro Kit owns the reusable UI; your app owns its data, routes, authorization, and decisions.
- Build up. Components combine into sections and whole application layouts. Keep it simple and go fast.