Tailwind's speed, without the class wall.
A utility-first CSS framework with a Rust compiler. Write a repeated variant once and Beam expands it into clean, atomic CSS - nothing ships to the browser but the styles.
npm install beamcss @beamcss/vite<button className="rounded-md px-4 py-2 hover:(bg-accent text-on-accent)">Write a variant prefix once and group the utilities it governs. The compiler expands it to identical atomic CSS — less markup, zero runtime overhead.
<button class="rounded-md px-4 py-2 bg-blue-500 text-white hover:bg-blue-700 hover:shadow-lg hover:scale-105"><button class="rounded-md px-4 py-2 bg-accent text-on-accent hover:( bg-accent+12 shadow-lg scale-105 )">→ both compile to identical atomic CSS
Layout utilities use the underlying CSS property vocabulary instead of Tailwind shorthand. flex-col becomes direction-column, items-center becomes align-center. Once you know the pattern, the CSS spec is your cheat sheet. Full mapping →
<div class="flex flex-col items-centergap-4 p-6 bg-white rounded-lg border border-gray-200 md:flex-row md:justify-between"><div class="flex direction-column align-centergap-4 p-6 bg-surface rounded-lg border border-line tablet:( direction-row justify-between )">→ same CSS output, semantic color tokens, grouped responsive variant
A small, regular grammar compiles to deduped atomic CSS under cascade layers. Parse → unfold → emit. Nothing runs in the browser.
@layer beam.utilities {
.flex { display: flex }
.bg-accent {
background: var(--color-accent)
}
.hover\:\(bg-accent\+12\):hover {
background: color-mix(
in oklab,
var(--color-accent), white 12%
)
}
}hover:(bg-accent text-on-accent)Factor a repeated prefix across many utilities - hover, focus, responsive, dark.
padding:(16 top:24)Keep related declarations in one clause instead of scattered atoms.
w-(--w)Bind a CSS variable at runtime with one stable class. Zero runtime cost.
Install, add the plugin, write classes. Beam compiles on every save.
$ npm install beamcss @beamcss/vite