-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[feat]: Adapting new Tailwind CSS v4.0 Beta #5949
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
Comments
The most significant change in the latest version that affected this project is removing the creation of JavaScript configuration by default. This alteration will affect the project (and even now does), necessitating a decision regarding its future use. One option is to halt its implementation, while an alternative would be to devise a configuration generator to merge it into the CSS file. While adapting to these changes may be straightforward, the recent release raises the question of whether it would be early to adopt them. Updating class names will be easy once the config adapting process is finished. |
for now, if you guys want to use tailwind v4 compatible with any new or existing app, it is pretty simple just run the codemod - npx @tailwindcss/upgrade@next so now the thing is you won't be able to add new components, as there won't be tailwind.config.js/ts anymore, so how do you add new components to your app? just create a temporary new project and run - npx shadcn@latest init -d
npx shadcn@latest add -a
npx @tailwindcss/upgrade@next and voila, you have a new tailwind v4 version of the components and css, just copy and paste required content if you wish to get this task automated, via CLI tool, feel free to emojify this comment and I will make one |
I have made a minimalist CLI tool that creates a shadcn-tailwindcss-v4 project in your current working directory or by the name of shadcnext in an existing directory you can use it to start a new project, or reference latest components in an existing v4 project npx shadcnext@latest create let me know if it works for you peeps |
I didn't use all of the shadcn/ui components and features, but I was able to run the ones I am using with Tailwind CSS v4 by
|
here is the reference template for it, config with tailwind v4, component classes compatible with v4 code for components can be easily referenced from src/components/ui, and components will always be latest, cuz it's auto updated every 8 hours, go nuts y'all! 🔥 --- more ---
|
Is anyone else experiencing Dialog component opening and closing in top-left direction? after the upgrade to Tailwind v4? Not sure if it is related to |
I just started seeing this when I updated to the release version of 4.0.0. Don't have time to look into it at the moment but will monitor this thread. Have you opened an issue anywhere else? Like on tailwindcss-animate? Or tailwindcss? |
Ok, thanks. No, I have not opened an issue anywhere else, |
You can just remove these two classes from |
Another option is jamiebuilds/tailwindcss-animate#63 (comment) |
Thanks. This gave me the same result as the solution recommended by @abhi2425 to remove the state classes from the So, this might be the only viable solution for v4 and Default style. Edit: If there is a way to migrate easily to new-york style and not use Edit2: testing out |
me personally would use this |
And remove |
You can also use my CSS-first port of |
Feature description
Why adapting?
The public release of Tailwind CSS v4.0 Beta is out, and I am thrilled with the new performance enhancements and features. There are so many global CSS features I'm excited to use, such as:
field-sizing
utilitiesThe speed improvements are also quite impressive
It still requires some configuration to achieve that performance.
Hope you adapting this beta version
maybe you can add new choose to using
tailwindcss
v4.0 or a way to update to this versionAffected component/components
Tailwind CSS
Additional Context
Check out the Theo react video for more insights.
Before submitting
The text was updated successfully, but these errors were encountered: