cnfast is a high-performance JavaScript replacement for the common cn utility used in Tailwind CSS projects. It combines conditional class values and resolves conflicting Tailwind classes while preserving byte-identical output with tailwind-merge. The package exposes cn, clsx, twMerge, and twJoin through a familiar API. Existing clsx, classnames, tailwind-merge, and shadcn/ui projects can migrate with minimal or automated changes. Caching and an optimized merge engine improve performance during repeated renders and component-heavy workloads. It supports standard function calls and tagged templates and is distributed as a compact npm package.
Features
- Tailwind class conflict resolution
- Conditional class value merging
- Drop-in cn API compatibility
- Automated project migration command
- Function and tagged-template syntax
- Optimized caching and merge performance
Categories
LibrariesLicense
MIT LicenseFollow cnfast
Other Useful Business Software
$300 Free Credits for Your Google Cloud Projects
Launch your next project with $300 in free Google Cloud credits—no strings attached. Test, build, and deploy without risk. Use your credits across the entire Google Cloud platform to find what works best for your needs. After your credits are used, continue with always-free tier services. Only pay when you're ready to scale. Sign up in minutes and start exploring.
Rate This Project
Login To Rate This Project
User Reviews
Be the first to post a review of cnfast!