Boomer​CSS
Write type-safe CSS with themes, variants, and responsive designs - all generated at build time.
Write blazingly fast type-safe styles with ease
import { css, v } from '@/libs/boomer' with { type: 'macro' }
// Simple CSS function for one-off styles
const buttonClass = css({
base: {
padding: '0.5rem 1rem',
backgroundColor: v('colors.primary'),
color: 'white',
borderRadius: '0.25rem'
}
})
// CSS function with variants
const buttonWithVariants = css({
base: {
padding: '0.5rem 1rem',
borderRadius: '0.25rem',
cursor: 'pointer'
},
variants: {
intent: {
primary: {
backgroundColor: v('colors.primary'),
color: 'white'
},
secondary: {
backgroundColor: 'transparent',
border: `1px solid ${v('colors.primary')}`,
color: v('colors.primary')
}
},
size: {
small: { fontSize: '0.875rem' },
large: { fontSize: '1.125rem' }
}
}
})
// Usage:
// <button className={buttonClass()}>Click me</button>
// <button className={buttonWithVariants({ intent: 'primary', size: 'small' })}>Click me</button>
Zero Runtime
All CSS is generated at build time with no runtime overhead or style calculations.
Type-Safe Styling
Full TypeScript support for theme tokens, variants, and CSS properties.
Variant Support
Create reusable component variants with type-safe props.
Theme System
Powerful theming with support for dark mode and custom color schemes.
Fully Yours
Modify the code to your liking.
Framework Agnostic
Works with any UI framework or vanilla JavaScript.