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
Comments
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 |
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 |
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? |
@jd-solanki You can share them here! |
Since it is supposed to be a refactoring to all components, could we give the possibility of compatibility with unocss? |
@sawa-ko It will be made with Tailwind v4. To what end would you make it compatible with Uno? |
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 I'll post regular updates on this issue. |
Please tell me how long it will take for this upgrade to be available. |
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. |
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: |
@robin-dongbin It's already in the making. There are already 13 components done, 36 more to go 😅 |
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 |
This is actually already what we're doing with the App Config. You can customize the classes for every part of every component. |
Thanks for the work! Just one question :
|
No we keep the For example the 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 |
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 🙏🏻 |
This commit 49b73aa made me think that NuxtUI could automatically use |
I was hesitant about do a PR to add a UImg component which returns either an img or nuxtimg element depending on whether the nuxt image module is present. |
@benjamincanac thanks for your quick answer and you're right but the idea came from seen many folks ask for unocss integration so unstyled could be possible to use unocss for styling ? And Yes there is Radix_vue and many out there but We Are NUXTERS 😂 We Love Nuxt and All its Ecosys |
The preset api I mentioned above solves this problem as well. It decouples nuxt-ui from tailwindcss, giving the user the freedom to use any css tool of their choice to provide the styles. The ui library can even remove the tailwindcss dependency and only provide tailwindcss presets, allowing the user to install the taiwindcss dependency and compile the presets on the user side. Official presets can provide classes compatible with tailwindcss and unocss. The user is free to choose either unocss or tailwindcss.Even if they prefer another css tool, they can completely redefine their styles using another css tool. I've been pitching the preset api I came up with, but @benjamincanac don't seem to be interested 😂 . |
I believe what @robin-dongbin is saying about the presets is very similar to what Shadcn UI does with the "default" and "New York" theme to change the appearance of every component. Maybe something like this could exist for Nuxt UI, but I'm not sure, since Shadcn does that by giving you the files for each component. However, I agree with @benjamincanac saying that if you already intend to use Nuxt UI completely unstyled, try using Radix Vue to build the components yourself. You might find that very useful. Radix Vue gives you full control over the styling of your components, while providing accessibility and the complex logic of the components for free. Use vanilla CSS, Tailwind, UnoCSS... whatever you consider best. Nuxt UI is meant to give you good looking, opinionated and pre-styled UI components, but expose the API to customize them when needed. And in my opinion, it does it wonderfully. I invite you to take a look at Radix Vue to build your own components if you apply to any of the following:
I won't lie... It can be significantly more work. But it is worth it if you really need it. |
@ChrisGV04 Thank you for your time replying on this really great answer |
I forgot to mention that the repository we're working on is public if you want to check out the progress: https://github.com/benjamincanac/ui3. The development is going very well, we're only missing 12 components and I can say that maintaining this version will be significantly easier. Also, contributing will be effortless with the internal CLI we created to initialize components: https://github.com/benjamincanac/ui3/blob/dev/cli/templates.mjs. I can't wait to finally release this 😊 |
With v3 can we have table footers? ❤️ #1025 |
And sticky headers! |
Awesome work ❤️ |
@benjamincanac I added something similar on |
Would it be possible to update I feel like this isn't currently possible with a chip #1627 |
|
We should start working on this next major by March, 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 😊.You can check out the development progress in this fork: https://github.com/benjamincanac/ui3.
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.
Overview
radix-vue
#409 which should solve allv3.0
issuesuseUI
for https://www.tailwind-variants.org/<script setup>
Generic table component #818)<script setup>
)Documentation
Once all these changes will be ready to merge on the
dev
branch, av2
branch will be created to keep supporting thev2
version for a certain period of time. As such, the current documentation will be available onhttps://ui-v2.nuxt.com
.I'm thinking of removing the
dev
packages from the documentation, not sure it's that useful as people who are checking new pull requests from GitHub can check the new docs inside the PRs content. Therefore, the documentation will deploy from themain
branch instead of thedev
branch.Breaking Changes
The biggest change is the switch to
tailwind-variants
, this will cause lots of breaking changes if you've used theui
prop orapp.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.The config will now have a
slots
amongst other keys that will specifically target dom nodes. Theui
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
andui
props are now perfectly typed, as well as all componentsprops
,slots
,emits
andexpose
.Accordion
#item
slot to#content
for consistencyUButton
underneath for a simple design easy to customizeAvatar
chip
prop in favor ofChip
componentButton
padded
propblock
prop no longer center the text but acts as a justify between to push the trailing iconDivider
Separator
for consistencyDropdown
DropdownMenu
for consistencyForm
New implementation of the Form component. Here's a list of notable changes from v2:
submit
from the Form'svalidateOn
propFormGroup
toFormField
path
toname
on form errors for consistencydisabled
prop on theForm
component to disable the entire formvalidateOnInputDelay
prop onFormField
andForm
components to control the debounce delay on validation on inputvalidate
function's name argument to an option to make it optionalThanks @romhml! 😊
Link
isActive
toactive
in default slotToggle
Switch
to be able to implement this: https://www.radix-vue.com/components/toggle.htmlon-icon
/off-icon
props tochecked-icon
/unchecked-icon
respectivelyPopover
overlay
prop as no primitive is available for this in Radix Vuepopper
prop in favor ofcontent
(https://www.radix-vue.com/components/popover.html#content) andarrow
prop#panel
slot to#content
for consistencyTabs
#item
slot to#content
for consistencyTooltip
popper
prop in favor ofcontent
(https://www.radix-vue.com/components/tooltip.html#content) andarrow
prop#content
slot for consistencyprevent
prop in favor of:open="false"
Modal
/Slideover
title
,description
andclose
props (this will deprecateDashboardModal
/DashboardSlideover
components in@nuxt/ui-pro
)appear
prop (was for Headless UI)VerticalNavigation
/HorizontalNavigation
NavigationMenu
with anorientation
prop#icon
,#avatar
and#badge
slots in favor of#leading
and#trailing
for consistencyComponents
The text was updated successfully, but these errors were encountered: