Skip to content
/ cn Public

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

Notifications You must be signed in to change notification settings

evanwinter/cn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@evanwinter/cn

Utility function for merging Tailwind class names as popularized by @shadcn/ui; all credit to them. Publishing to NPM for my convenience.

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)}>
  )
}

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published