Type-safe end to end
Dimension values, theme shapes and prop types are inferred through every chain call — .attrs(), .theme(), .states(), .sizes() — so <Button primary lg> is checked at compile time.
v2.9.0 · 15 packages · MIT · TypeScript-first
A modular React ecosystem — UI primitives, a 6.98 KB CSS-in-JS engine (min+gz), multi-state styling, responsive layout, 36 hooks and CSS-transition motion. This page is built with it.
— Proof, not adjectives
Styled components, css, keyframes, global styles and theming — with streaming SSR through React 19 <style precedence>. 2.6× smaller than styled-components.
— Why Vitus Labs
Every package works on its own, and they interlock. Pick the styling engine, keep the component code.
Dimension values, theme shapes and prop types are inferred through every chain call — .attrs(), .theme(), .states(), .sizes() — so <Button primary lg> is checked at compile time.
Immutable, chainable component factories. priorityAttrs → attrs → explicit props, last wins. Every call returns a new component, so variants never leak into each other.
The same component code runs on the built-in styler, styled-components or Emotion — one init() call picks the connector. connector-native turns CSS strings into React Native styles.
250+ CSS property descriptors. Every layout prop takes a value, a mobile-first array or a breakpoint object — and coolgrid adds a Container / Row / Col grid on top.
One kinetic() factory for enter/leave, stagger, collapse and keyed-list modes on native CSS transitions, plus 122 presets in kinetic-presets. prefers-reduced-motion is honoured automatically.
Static templates resolve once and are cached; dynamic ones re-run only their interpolations. SSR streams through React 19 <style precedence>, so a static export ships styled HTML.
— Live, not a screenshot
This is the actual rocketstyle Button the page is built with. Flip a dimension and the component re-resolves its theme.
export const Button = rocketstyle()({ component: Element }) .attrs({ tag: 'button' }) .states({ primary: { backgroundColor: t.accent, color: t.ink }, outline: {}, ghost: { borderColor: 'transparent' }, }) .sizes({ sm: { fontSize: 13, paddingX: 14, paddingY: 9 }, md: { fontSize: 15, paddingX: 22, paddingY: 14 }, lg: { fontSize: 17, paddingX: 28, paddingY: 17 }, }) <Button state="primary" size="md">Ship it →</Button>
— @vitus-labs/*
All released together at v2.9.0 — one version to bump, nothing to keep in sync.
— Four packages to render
core, a connector, elements and unistyle are enough to render. Add rocketstyle, coolgrid, hooks or kinetic when you need them — every package ships at v2.9.0. MIT licensed.
# core + engine + primitives $ npm i @vitus-labs/core \ @vitus-labs/connector-styler \ @vitus-labs/elements @vitus-labs/unistyle # once, before the first render init({ ...connector, component: 'div', textComponent: 'span' }) # peer: react ≥ 19