P4sca1 / nuxt-headlessui

Headless UI integration for Nuxt. Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
MIT License
171 stars 7 forks source link

Default prefix #7

Closed DamianGlowala closed 2 years ago

DamianGlowala commented 2 years ago

Great Nuxt module! ✨

I wonder whether it would make more sense to set the default prefix to HeadlessUi instead? This makes it more distinctive and whoever reads the code knows immediately where the component comes from. Headless on its own could be, in theory, related to anything (e.g. a component coming from a headless CMS).

P4sca1 commented 2 years ago

Hey 👋 Thank you for your feedback. I personally thought that the Headless prefix is sufficient to distinguish from other components and HeadlessComponent or headless-component is easier to write than HeadlessUiComponent or headless-ui-component. However you made a point about headless CMS.

Still, I believe that for the majority of people the current prefix is the most convenient and changing it would be a breaking change. However, I can consider it for a v2 release, if there is enough demand for it. In the meantime, you can just change the prefix for your project if that works better for you.

Note that you can also set the prefix to an empty string in which case you can just use the component names directly. Beware that this might conflict with your own components.

DamianGlowala commented 2 years ago

Appreciate your comprehensive response! Fully agree on all the points. Being able to set a custom prefix is completely sufficient to satisfy everyone's preferences, regardless of the defaults.

Closing :)