An open API service indexing awesome lists of open source software.

https://github.com/bansal/cn

An utility function to merge tailwindcss classes
https://github.com/bansal/cn

Last synced: 11 months ago
JSON representation

An utility function to merge tailwindcss classes

Awesome Lists containing this project

README

          

# @bansal/cn

An utility function to merge tailwindcss classes.
Borrowed from [@shadcn/ui](https://github.com/shadcn-ui/ui)

## install

```bash
npm install @bansal/cn
```

## Usage

```javascript
import { cn } from "@bansal/cn";
const className = cn(
"flex justify-start items-center p-0",
"justify-between items-start",
"p-4"
);
// className = "flex justify-between items-start p-4"
```