ui icon indicating copy to clipboard operation
ui copied to clipboard

Vue compatibility

Open benjamincanac opened this issue 1 year ago • 5 comments

After many requests from the community (nuxt/ui#187, nuxt/ui#298, nuxt/ui#543, nuxt/ui#850, nuxt/ui#1514, etc.), the goal would be to make @nuxt/ui compatible for non-Nuxt apps as a Vite plugin I guess.

The minimal features would be to:

  • Run Tailwind CSS vite plugin
  • Inject components
  • Inject composables
  • Use @iconify/vue instead of @nuxt/icon (we don't need that much complexity I guess)
  • Use VueUse https://vueuse.org/core/useDark/#usedark instead of @nuxtjs/color-mode
  • Make Nuxt specific imports (#imports, #build, etc.) work
  • Make Nuxt specific composables (useAppConfig, ~~useId~~, etc.) work
  • Make theming with app.config.ts work in some way

benjamincanac avatar Aug 23 '24 11:08 benjamincanac

It would probably be worth it to keep the Nuxt config for Nuxt apps and the non-Nuxt config for non-Nuxt apps. It could probably be done with a few wrapper functions that would dynamically determine if it's running in a Nuxt context. I assume using something more tightly-integrated with the Nuxt ecosystem (like an actual Nuxt module) would offer better capabilities for Nuxt apps than generic Vue/non-Nuxt tools (not that I think that non-Nuxt tools are less capable, but it's just better coupled, like using Nitro vs Express as the server).

If you'd like, I can do my best to assist in making this change

GalacticHypernova avatar Aug 26 '24 15:08 GalacticHypernova

Very happy to see this happening. Thank you! ☺️ I can help with any testing, please let me know.

TechAkayy avatar Sep 07 '24 14:09 TechAkayy

@benjamincanac @danielroe Could you please confirm if you plan to support Vue applications? If so, could you provide guidance on how to install and test this with Vue 3? Additionally, if needed, how can I assist in extending support to Vue? Thanks

ManukMinasyan avatar Sep 27 '24 12:09 ManukMinasyan

i’ll provide guidance once i implement it 😆

danielroe avatar Sep 27 '24 16:09 danielroe

i’ll provide guidance once i implement it 😆

They are any deadline?

ManukMinasyan avatar Sep 27 '24 16:09 ManukMinasyan

What a great news! Congrats on this. I'm curious to know if you have already found another name? I guess keeping "Nuxt UI" would be misleading regarding to the compatibility.

ddahan avatar Oct 13 '24 14:10 ddahan

We have no plan to rename it, this is a module built and thought for Nuxt that will support Vue 😊

benjamincanac avatar Oct 14 '24 09:10 benjamincanac

made some good progress today - ~~just need to implement icon + color mode support!~~

https://github.com/user-attachments/assets/d16af91d-99da-4e9c-b618-9fe0d91c5b98

you can see the progress in a livestream at https://youtube.com/live/KRYFcyNNxDk?feature=share if you want

  • [x] Run Tailwind CSS vite plugin
  • [x] Inject components
  • [x] Inject composables
  • [x] Use @iconify/vue instead of @nuxt/icon (we don't need that much complexity I guess)
  • [x] Use VueUse https://vueuse.org/core/useDark/#usedark instead of @nuxtjs/color-mode
  • [x] Make Nuxt specific imports (#imports, #build, etc.) work
  • [x] Make Nuxt specific composables (useAppConfig, ~~useId~~, etc.) work
  • [x] Make theming with app.config.ts work in some way

danielroe avatar Oct 17 '24 12:10 danielroe

Wow thanks Daniel « Heroe » !!!

lewebsimple avatar Oct 19 '24 00:10 lewebsimple

@benjamincanac so now can i use it without nuxtjs?

twf-nikhila avatar Nov 21 '24 06:11 twf-nikhila

Yes you can 😊 https://ui3.nuxt.dev/getting-started/installation/vue

benjamincanac avatar Nov 21 '24 09:11 benjamincanac