Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 #1289

Open
44 tasks done
benjamincanac opened this issue Jan 29, 2024 — with Volta.net · 211 comments
Open
44 tasks done

v3 #1289

benjamincanac opened this issue Jan 29, 2024 — with Volta.net · 211 comments
Assignees
Labels

Comments

Copy link
Member

benjamincanac commented Jan 29, 2024

The development is ongoing on the v3 branch of this repository: https://github.com/nuxt/ui/tree/v3.


A lot has changed since @nuxt/ui was made open-source (May 2023), so the plan here is to rewrite every component from scratch alongside their config.

I'll post regular updates on this issue and on https://twitter.com/benjamincanac.

Documentation

https://ui3.nuxt.dev

Roadmap (Nov 20, 2024)

  • Finish the migration to reka-ui@alpha on @nuxt/ui & @nuxt/ui-pro
  • Write the docs for implemented @nuxt/ui-pro components
  • Finish @nuxt/ui-pro components (almost all are done except for Dashboard)
  • Make Nuxt UI Pro v3 work with Vue like Nuxt UI
  • Implement new components in @nuxt/ui like Calendar, DateInput, DatePicker, Tree, Stepper, etc.
  • Migrate all the Nuxt UI Pro templates (starter, landing, docs, saas and dashboard)
  • Write a complete migration guide
  • Build the Nuxt UI docs marketing pages (landing, pricing, templates, etc.)
  • Migrate all the Nuxt apps (nuxt.com, image.nuxt.com, eslint.nuxt.com, devtools.nuxt.com, fonts.nuxt.com, hub.nuxt.com, nuxt.studio, etc.)
  • Release @nuxt/ui & @nuxt/ui-pro officially once tailwindcss and reka-ui are released
  • Make new @nuxt/ui-pro components & templates like Changelog, Portfolio, etc.

Breaking Changes

The biggest change is the switch to tailwind-variants, this will cause lots of breaking changes if you've used the ui prop or app.config.ts to override the config. I apologize in advance for this but I strongly believe this will be beneficial and will bring consistency across all components.

At the beginning the config was split in many keys for the same div to give more flexibility, but since then we introduced tailwind-merge which now allows us to group those keys together, this is a good opportunity to clean the whole thing.

The config will now have a slots amongst other keys that will specifically target dom nodes. The ui prop will only allow you to target those slots.

These changes alongside the refactor of all components will also improve the types, the app.config.ts and ui props are now perfectly typed, as well as all components props, slots, emits and expose.

Feel free to comment on this if you have any ideas for the next major.

Components

@benjamincanac benjamincanac added the v3 #1289 label Jan 29, 2024 — with Volta.net
@benjamincanac benjamincanac pinned this issue Jan 29, 2024
@benjamincanac benjamincanac added release and removed v3 #1289 labels Jan 29, 2024
@benjamincanac benjamincanac changed the title Major v3.0 release v3.0 release Jan 29, 2024
@benjamincanac benjamincanac changed the title v3.0 release Next v3.0 release Jan 29, 2024
@sandros94
Copy link
Collaborator

I would like to help, if I'm able to. Is there going to be a dedicated branch or will it be done in the dev one?

Copy link
Member Author

Once we start this, there will be indeed a new branch with auto-release so we can try it out and especially keep working on the v2 as it might take some time. I'll create new issues once this gets started with the remaining things to do 😊

@jd-solanki
Copy link

Hi @benjamincanac

I have few design ideas if you are open to this I would like to share it for the future of Nuxt UI 3. Should we discuss this in this issue or it'll be better to discuss design ideas in seperate discussion thread?

Copy link
Member Author

@jd-solanki You can share them here!

@benjamincanac benjamincanac changed the title Next v3.0 release v3.0 Mar 4, 2024
@sawa-ko
Copy link

sawa-ko commented Mar 5, 2024

Since it is supposed to be a refactoring to all components, could we give the possibility of compatibility with unocss?

Copy link
Member Author

benjamincanac commented Mar 6, 2024

@sawa-ko It will be made with Tailwind v4. To what end would you make it compatible with Uno?

@benjamincanac benjamincanac self-assigned this Mar 6, 2024
Copy link
Member Author

benjamincanac commented Mar 6, 2024

I've started working on this in a private repository of mine, I'll open-source it once I'm satisfied with the base so you guys can check it out 😊.

A lot has changed since @nuxt/ui was made open-source (May 2023), so the plan here is to rewrite every component from scratch alongside their config. For example, at the beginning the config was split in many keys for the same div to give more flexibility, but since then we introduced tailwind-merge which now allows us to group those keys together.

I'll post regular updates on this issue.

@ghost
Copy link

ghost commented Mar 8, 2024

Please tell me how long it will take for this upgrade to be available.
Very much looking forward to this upgrade

Copy link
Member Author

I have no idea how long it will take and it's not entirely up to us, I hope to release it at the same time as the official release of Tailwind v4.

@robin-dongbin
Copy link

That's awesome. The new version of nuxt-ui uses exactly the tech stack I expected.

I tried to build my own UI library using radix-ui and tailwind-variants, but I immediately found that even with radix-ui, it is not easy to build a full UI library.

But I got an idea with an API that works with any design language. If you are interested, here is my demo repository:
https://github.com/vincajs/vinca-ui

Copy link
Member Author

@robin-dongbin It's already in the making. There are already 13 components done, 36 more to go 😅

@robin-dongbin
Copy link

Since the component library is based on radix-ui without styles, I thought it would be nice to provide an api that is abstracted from various design systems, so you can switch styles from one system to another at any time.

If people want to implement another design system, they can just customize it, share files, or even contribute to a repository.

Taking things a step further, it is possible to switch between different design systems at runtime.

Of course, I'm just offering an idea, and if you think it's too late, that's fine

Copy link
Member Author

This is actually already what we're doing with the App Config. You can customize the classes for every part of every component.

@aspitrine
Copy link

Thanks for the work!
i’m impatient to try this!

Just one question :

The biggest change is the switch to tailwind-variants, this will cause lots of breaking changes if you've used the ui prop or app.config.ts to override the config.

app.config.ts is deprecated and it will not port in v3? Or it’s something else?

Copy link
Member Author

No we keep the app.config.ts, what I meant is since we now use tailwind-variants the config itself changes.

For example the Kbd component, its config looked like this:

export default {
  base: 'inline-flex items-center justify-center text-gray-900 dark:text-white',
  padding: 'px-1',
  size: {
    xs: 'h-4 min-w-[16px] text-[10px]',
    sm: 'h-5 min-w-[20px] text-[11px]',
    md: 'h-6 min-w-[24px] text-[12px]'
  },
  rounded: 'rounded',
  font: 'font-medium font-sans',
  background: 'bg-gray-100 dark:bg-gray-800',
  ring: 'ring-1 ring-gray-300 dark:ring-gray-700 ring-inset',
  default: {
    size: 'sm'
  }
}

Here is the new version:

export default {
  base: 'inline-flex items-center justify-center text-gray-900 dark:text-white px-1 rounded font-medium font-sans bg-gray-50 dark:bg-gray-800 ring ring-gray-300 dark:ring-gray-700 ring-inset',
  variants: {
    size: {
      xs: 'h-4 min-w-[16px] text-[10px]',
      sm: 'h-5 min-w-[20px] text-[11px]',
      md: 'h-6 min-w-[24px] text-[12px]'
    }
  },
  defaultVariants: {
    size: 'sm'
  }
}

This is a breaking change if you've overridden its config in your app.config.ts or through the ui prop. I'm thinking of a CLI or something that would help people migrate from v2 to v3 without too much trouble but it might not be easy to achieve. Everything is fully typed so this will give some indications at least.

@aspitrine
Copy link

Ok !

Effectively, it's a breaking change but it seam ok for the future to have a better granularity with the variants.

Thanks for the explanation and the example 🙏🏻

@rigtigeEmil
Copy link

@benjamincanac I've been slowly migrating existing code over, so far it's super nice!
Is the Divider component being deprecated in v3?

@divine
Copy link

divine commented Nov 15, 2024

@benjamincanac I've been slowly migrating existing code over, so far it's super nice! Is the Divider component being deprecated in v3?

I have been trying to migrate as well. Missing Meter component. Will it be added as well or depreciated?

Thanks!

Copy link
Member Author

@rigtigeEmil Awesome! It's called Separator now to match Radix Vue: https://ui3.nuxt.dev/components/separator

@divine The Meter and MeterGroup components are the only ones I didn't migrate, I'm not entirely sure what to do about them honestly since there are no primitive on Radix Vue to rely on and also because you can almost do exactly the same thing with Progress: https://ui3.nuxt.dev/components/progress

@rigtigeEmil
Copy link

@rigtigeEmil Awesome! It's called Separator now to match Radix Vue: https://ui3.nuxt.dev/components/separator

@divine The Meter and MeterGroup components are the only ones I didn't migrate, I'm not entirely sure what to do about them honestly since there are no primitive on Radix Vue to rely on and also because you can almost do exactly the same thing with Progress: https://ui3.nuxt.dev/components/progress

Ah, so nice. Cheers!

@divine
Copy link

divine commented Nov 15, 2024

@divine The Meter and MeterGroup components are the only ones I didn't migrate, I'm not entirely sure what to do about them honestly since there are no primitive on Radix Vue to rely on and also because you can almost do exactly the same thing with Progress: https://ui3.nuxt.dev/components/progress

@benjamincanac what I liked with Meter is that it provided a slot indicator: https://ui.nuxt.com/components/meter#indicator-1

The new progress component doesn't have any slots. Maybe this can be added?

Also, meter group and labels were quite excellent!

Thanks!

Copy link
Member Author

@MickL
Copy link

MickL commented Nov 16, 2024

Can we maybe have this fixed with v3? :)
#1905

@mostafaznv
Copy link

Hi Nuxt team, thanks for your great work!

Will there be a feature to define default values for component props? For example, instead of creating a MyButton component to set default values for Nuxt’s Button component, it would be great to define these defaults directly in nuxt.config.ts.

Sorry to bother you, @benjamincanac
Do you have any thoughts on this? I believe it would be an amazing feature, but I’m not sure if it’s currently a priority for you.

I’ve been keeping an eye on a few Vue frameworks to decide on my next go-to framework, and I’m curious about this feature. For now, it seems like only Vuetify supports it.

Copy link
Member Author

@mostafaznv It is not planned at the moment no, it would require a tremendous amount of work to make all props configurable globally and would not be very clean since we now use type-based declaration for props.

However, all props regarding the theme are configure globally already like color, variant, size, etc.

@hywax
Copy link

hywax commented Nov 16, 2024

@mostafaznv It is not planned at the moment no, it would require a tremendous amount of work to make all props configurable globally and would not be very clean since we now use type-based declaration for props.

However, all props regarding the theme are configure globally already like color, variant, size, etc.

I've been thinking about this. I actually need this functionality because some components have default props that need to be overridden. And I don't like doing it every time.

I'll think about the best way to do this without a headache. It's clear that it won't be quick, but I would like to have this functionality.

@MickL
Copy link

MickL commented Nov 18, 2024

I just noticed that Nuxt UI is lacking a spinner. Maybe the content could be an icon set by prop or custom content set by a slot.

@rigtigeEmil
Copy link

I just noticed that Nuxt UI is lacking a spinner. Maybe the content could be an icon set by prop or custom content set by a slot.

Do you mean something outside of being able to add a loading indicator on most items?
https://ui3.nuxt.dev/components/button#loading

@hywax
Copy link

hywax commented Nov 18, 2024

@MickL @rigtigeEmil #2668

@MickL
Copy link

MickL commented Nov 18, 2024

Yes some components have this abbility but there is no standalone component

@spencerjsmall
Copy link

Hey! Loving v3 so far. Any timeline for when Pro v2 docs will be out?

Copy link
Member Author

benjamincanac commented Nov 20, 2024

They will be coming soon!

Here is my roadmap for the coming months while maintaining both Nuxt UI v2/v3 and Nuxt UI Pro v1/v3:

  1. Finish the migration to reka-ui@alpha on @nuxt/ui & @nuxt/ui-pro
  2. Write the docs for implemented @nuxt/ui-pro components
  3. Finish @nuxt/ui-pro components (almost all are done except for Dashboard)
  4. Make Nuxt UI Pro v3 work with Vue like Nuxt UI
  5. Implement new components in @nuxt/ui like Calendar, DateInput, DatePicker, Tree, Stepper, etc.
  6. Migrate all the Nuxt UI Pro templates (starter, landing, docs, saas and dashboard)
  7. Write a complete migration guide
  8. Build the Nuxt UI docs marketing pages (landing, pricing, templates, etc.)
  9. Migrate all the Nuxt apps (nuxt.com, image.nuxt.com, eslint.nuxt.com, devtools.nuxt.com, fonts.nuxt.com, hub.nuxt.com, nuxt.studio, etc.)
  10. Release @nuxt/ui & @nuxt/ui-pro officially once tailwindcss and reka-ui are released
  11. Make new @nuxt/ui-pro components & templates like Changelog, Portfolio, etc.

@ikxin
Copy link

ikxin commented Nov 20, 2024

They will be coming soon!

Here is my roadmap for the coming months while maintaining both Nuxt UI v2/v3 and Nuxt UI Pro v1/v3:

  1. Finish the migration to reka-ui@alpha on @nuxt/ui & @nuxt/ui-pro
  2. Write the docs for implemented @nuxt/ui-pro components
  3. Finish @nuxt/ui-pro components (almost all are done except for Dashboard)
  4. Implement new components in @nuxt/ui like Calendar, DateInput, DatePicker, Tree, Stepper, etc.
  5. Migrate all the Nuxt UI Pro templates (starter, landing, docs, saas and dashboard)
  6. Write a complete migration guide
  7. Build the Nuxt UI docs marketing pages (landing, pricing, templates, etc.)
  8. Migrate all the Nuxt apps (nuxt.com, image.nuxt.com, eslint.nuxt.com, devtools.nuxt.com, fonts.nuxt.com, hub.nuxt.com, nuxt.studio, etc.)
  9. Release @nuxt/ui & @nuxt/ui-pro officially once tailwindcss and reka-ui are released
  10. Make new @nuxt/ui-pro components & templates like Changelog, Portfolio, etc.

Relatively speaking, I am looking forward to it more https://ui3.nuxt.dev/pro

@twf-nikhila
Copy link

Any progress on using it without nuxtjs? Will purchase pro if it works

@ikxin
Copy link

ikxin commented Nov 21, 2024

Any progress on using it without nuxtjs? Will purchase pro if it works

Nuxt UI can now use it on Vue. For details, please check https://ui3.nuxt.dev/getting-started/installation/vue

@twf-nikhila
Copy link

Any progress on using it without nuxtjs? Will purchase pro if it works

Nuxt UI can now use it on Vue. For details, please check https://ui3.nuxt.dev/getting-started/installation/vue

Awesome, the pro version also works with Vuejs?

@cbalmefrezol
Copy link

@twf-nikhila @ikxin
Be careful, there are some issues with Vue #2518 !
I have the same problem.

Copy link
Member Author

Nuxt UI Pro v3 doesn't work with Vue yet, I have to work on this.

@twf-nikhila
Copy link

Nuxt UI Pro v3 doesn't work with Vue yet, I have to work on this.

@benjamincanac any timeline for when it'll be released?

@MickL
Copy link

MickL commented Nov 21, 2024

They will be coming soon!

Here is my roadmap for the coming months while maintaining both Nuxt UI v2/v3 and Nuxt UI Pro v1/v3:

  1. Finish the migration to reka-ui@alpha on @nuxt/ui & @nuxt/ui-pro
  2. Write the docs for implemented @nuxt/ui-pro components
  3. Finish @nuxt/ui-pro components (almost all are done except for Dashboard)
  4. Make Nuxt UI Pro v3 work with Vue like Nuxt UI
  5. Implement new components in @nuxt/ui like Calendar, DateInput, DatePicker, Tree, Stepper, etc.
  6. Migrate all the Nuxt UI Pro templates (starter, landing, docs, saas and dashboard)
  7. Write a complete migration guide
  8. Build the Nuxt UI docs marketing pages (landing, pricing, templates, etc.)
  9. Migrate all the Nuxt apps (nuxt.com, image.nuxt.com, eslint.nuxt.com, devtools.nuxt.com, fonts.nuxt.com, hub.nuxt.com, nuxt.studio, etc.)
  10. Release @nuxt/ui & @nuxt/ui-pro officially once tailwindcss and reka-ui are released
  11. Make new @nuxt/ui-pro components & templates like Changelog, Portfolio, etc.

Thats a long list! Personally I would appreciate if Nuxt UI is first priority and Nuxt UI Pro comes after everything is finished. This would also assure that v3 is tested well enough before you release Pro v3.

@sandros94
Copy link
Collaborator

Personally I would appreciate if Nuxt UI is first priority and Nuxt UI Pro comes after

Nuxt UI definitely has the priority! Since UI Pro is built on top of it, everything needs to work on UI before being merged and used by UI Pro itself.

But do keep in mind that both projects depend on two separate upstreams (tailwind v4 and reka ui) that are currently in alpha stage. Developing these 4 projects almost in parallel makes spotting and resolving issues much quicker, ending up in a much better beta and stable releases for all.

@ikxin
Copy link

ikxin commented Nov 22, 2024

Tailwind v4 has been in alpha for a long time 😂

@adjabaev
Copy link
Contributor

Tailwind v4 has been in alpha for a long time 😂

Well the first beta version has been released today 😂

@sharmapukar217
Copy link

sharmapukar217 commented Nov 22, 2024

how to use asChild on <UButton /> component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests