@macklinu/cx
v2.0.0
Published
A utility for creating className strings
Downloads
22
Readme
cx
A utility for creating className strings
Installation
pnpm add @macklinu/cx
Usage
This is a combination of two libraries that I always use with Tailwind:
import { cx } from '@macklinu/cx'
cx('foo', 'bar') // 'foo bar'
// say state === 'loading'
cx('bg-red', 'text-white', state === 'loading' && 'is-loading') // 'bg-red text-white is-loading'
cx() // ''