me.at.coding
me.at.coding

Reputation: 17604

tailwindcss-forms plugin / styling forms with Tailwind CSS

I am new to Tailwind CSS and stumbled across the tailwindcss-forms plugin.

  1. Why exactly do we need that? Does it just provide new classes that I have to apply manually or does it by default apply some classes to forms?
  2. Can't I just apply classes from the regular Tailwind CSS to my forms?
  3. What's the difference to e.g. tailwindcss-custom-forms?

Upvotes: 0

Views: 1257

Answers (1)

nucky
nucky

Reputation: 348

  1. Tailwind CSS is not exactly providing solutions for form elements like Select-tags and co. that work on all major browsers.
  2. If you apply those from Tailwind CSS, you may either add your own elements (e.g. arrows) for a Select tag, inputs, and co. or work with CSS. You can also look on how developers solved these issues with examples from Tailwind Components.
  3. Tailwind CSS Forms was made to make this possible and it works with Tailwind CSS 2 while Tailwind CSS Custom Form is deprecated.

Upvotes: 2

Related Questions