
cnfast
aidenybai
Fast drop in replacement for `cn`
AI 简介
cnfast 是一个高性能的 Tailwind CSS 类名合并工具,旨在无缝替代现有的 cn 工具(如 tailwind-merge + clsx 组合)。它提供完全兼容的 API,支持函数调用与模板字符串两种语法,平均性能达 tailwind-merge 的 3.8 倍,重渲染场景下最高提升至 4.3 倍,且输出字节完全一致。内置自动迁移命令,可一键升级 clsx、classnames 或 tailwind-merge 项目,并原生集成 shadcn/ui 生态。适用于对前端渲染性能敏感的 React/Vue 等框架项目,尤其适合组件复用率高、类名动态组合频繁的 UI 库或大型应用。
TypeScript
Other1.1k
Stars
11
Forks
1
Watchers
6
Issues
Star 增长
今日0
近 7 天0
近 30 天+22
综合评分53.44
默认分支main