Skip to content

Plugins doesn't seem to load in tailwind v4 #178

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

Closed
tomvo opened this issue Feb 11, 2025 · 5 comments
Closed

Plugins doesn't seem to load in tailwind v4 #178

tomvo opened this issue Feb 11, 2025 · 5 comments

Comments

@tomvo
Copy link

tomvo commented Feb 11, 2025

What version of @tailwindcss/forms are you using?

latest

What version of Node.js are you using?

20

What browser are you using?

n/a

What operating system are you using?

osx

Reproduction repository

https://github.com/tailwindlabs/tailwindcss-forms

Describe your issue

Tailwind4 drops the tailwind config, what is now the preferred way of importing the plugin?

@philipp-spiess
Copy link
Member

Hey! You can use @plugin to load plugins in Tailwind CSS v4: https://tailwindcss.com/docs/functions-and-directives#plugin-directive

Going to close this but this needs updating in our projects README you are right. Will see to get to it this week. 👍

@arthurshlain
Copy link

How to define strategy: 'class' in @plugin directive?

@philipp-spiess
Copy link
Member

@arthurshlain Like this:

@plugin "@tailwindcss/typography" {
  strategy: class;
}

@darylknight
Copy link

Please can you update the documentation? This isn't mentioned anywhere in this repository.

@nickjj
Copy link

nickjj commented May 11, 2025

I noticed using strategy: class wasn't working in cases where you want forms to be styled up automatically.

This worked:

@plugin "@tailwindcss/forms" {
  strategy: base;
}

This way you don't need to attach any classes to your forms.

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

No branches or pull requests

5 participants