Easiest way to check if Tailwind is installed

Viewed 4870

I am playing around with Tailwind and Next.js, but I am having trouble figuring out if it's installed or not. Even when I go to https://play.tailwindcss.com/ and try the following HTML element styled with Tailwind.

<h1 className="text-3xl font-bold underline">
      Hello world!
</h1>

It doesn't render it underlined or even an h1 element. I follow the instructions at https://tailwindcss.com/docs/guides/nextjs verbatim. Any ideas?

1 Answers

The reason it's not working for you is that you are using className instead of class.

<h1 class="text-3xl font-bold underline">
      Hello world!
</h1>

Using NPM, you can see if a specific package is installed.

npm view tailwindcss version

Or

npm info tailwindcss version

If you're using NPX, you can do the following.

npx gvi tailwindcss
Related