[feat]: Use cn instead of ny for class name helper
#26
Replies: 6 comments
-
|
Hello there 👋 Thanks for opening your first issue. We welcome you to the ui community! 😊 |
Beta Was this translation helpful? Give feedback.
-
|
Yep, as few things "custom" as possible. |
Beta Was this translation helpful? Give feedback.
-
|
+1 for it. |
Beta Was this translation helpful? Give feedback.
-
|
Plus, lots of folks use shadcn/ui. If you keep things standard we can use the same CLI to install components (like v0, magicui, personal registries, etc) |
Beta Was this translation helpful? Give feedback.
-
|
Am I the only one who likes the ny ? ^^ it's helpful as I can clearly see the origin of the component when combining multiple frameworks/code snippets, like aceternity + nyxb. I run a snippet on the codebase to change the imports from |
Beta Was this translation helpful? Give feedback.
-
|
I will keep using The This approach gives us the best of both worlds - maintaining our library's unique identity while providing flexibility for developers who prefer standard conventions. I'll transfer this to discussions as it's more of a design philosophy discussion rather than an issue that needs to be resolved. This will allow for a more open dialogue about naming conventions and library identity. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Feature description
I'm suggesting switching back to the standard
cnclass name helper that shadcn and magicui use for the tailwind merge utility helper. Thenyfunction is a custom thing that's not as clear what it means.This will help when getting AI to auto-generate code (like GitHub copilot or Cursor) using the components already in the code base. And it'll help when using tools like v0.dev to create the UI elements.
Affected component/components
All Components with styling
Additional Context
Right now, the manual installation shows using this class name helper in
lib/utils.ts:I'm suggesting using this instead:
Before submitting
Related commits
91f664a
283b44d
a702f31
134658b
dd2ea8d
dac8517
5be2fdb
Beta Was this translation helpful? Give feedback.
All reactions