Start here
@hulla/style
Define class variants once and infer the component props from their keys, in any framework.
On this page
@hulla/style combines class names and gives components named choices such as small or large. It works with your existing CSS and framework.
Create the helpers once, then pass classes and conditions to cn():
import { style } from '@hulla/style'
const { cn } = style()
const isActive = true
cn('button', { active: isActive }) // 'button active'Use vn() to map names to classes. For Tailwind conflict resolution, configure a custom composer.
| If you need to… | Start here |
|---|---|
| Install the package and create shared helpers | Quick start |
| Type a component prop from a finite set of styles | Variants |
| Combine shared classes, variants, and caller classes | Composition |
| Choose exact-token deduplication or Tailwind-aware merging | Custom merging |
For accepted inputs, signatures, and serializer behavior, see the API reference.