@evanwinter/cn
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

@evanwinter/cn

Utility function for merging Tailwind class names as popularized by @shadcn/ui.

Installation

npm i @evanwinter/cn

Usage

import { cn } from '@evanwinter/cn';

export function Button({ className, ...props }: React.ButtonHTMLAttributes<HTMLButtonElement>) {
  return (
    <button {...props} className={cn("bg-black text-white rounded", props.className)}>
  )
}

Readme

Keywords

none

Package Sidebar

Install

npm i @evanwinter/cn

Weekly Downloads

6

Version

1.0.2

License

ISC

Unpacked Size

2.17 kB

Total Files

9

Last publish

Collaborators

  • evan-winter