ui icon indicating copy to clipboard operation
ui copied to clipboard

[feat]: Add tailwind content step for vite guide

Open imMatheus opened this issue 1 year ago • 2 comments

Feature description

In the guide for setting up shadcnui with vite, https://ui.shadcn.com/docs/installation/vite, I suggest we add a new section between current 2 and 3 that tells the user to change their content field in tailwind.config.js to include content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'].

Screenshot 2024-09-26 at 18 29 02

This is a step that is needed to get it to work. I followed the steps that there currently in the docs and it did not work as I got the following issue:

No Tailwind CSS configuration found at /Users/me/Desktop/project
It is likely you do not have Tailwind CSS installed or have an invalid configuration.
Install Tailwind CSS then try again.
Visit https://tailwindcss.com/docs/guides/vite to get started.

So its a necessary step to get it to work now, after I changed the content field it started working. It's also what Tailwind has right after installing the package so makes sense to include tbh

Screenshot 2024-09-26 at 18 31 58

Affected component/components

No response

Additional Context

I could make a quick simple PR for this to get it out 🙏

Before submitting

  • [X] I've made research efforts and searched the documentation
  • [X] I've searched for existing issues and PRs

imMatheus avatar Sep 26 '24 16:09 imMatheus

I agree this is a very important step missing from the documentation that is required. This caused a small headache for an hour or two at the start of the project but adding the above from the tailwind documentation fixed the issue.

iainbrux avatar Sep 30 '24 11:09 iainbrux

You also need to paste

@tailwind base;
@tailwind components;
@tailwind utilities;

in index.css to make it work

a89529294 avatar Oct 06 '24 06:10 a89529294

This issue has been automatically marked as stale due to two years of inactivity. It will be closed in 7 days unless there’s further input. If you believe this issue is still relevant, please leave a comment or provide updated details. Thank you.

shadcn avatar Mar 02 '25 11:03 shadcn

No stale. Something went wrong with the stale bot.

shadcn avatar Mar 02 '25 11:03 shadcn

Hi. We're closing some old issues as outdated. If this is still relevant (and not fixed in main), leave a message, we'll reopen it. Thank you. Appreciate your contribution to the project - shadcn

shadcn avatar Oct 16 '25 10:10 shadcn