Skip to content
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

[feat]: Update the CLI documentation to Include Instructions on Installing React 18 Components #6817

Open
2 tasks done
jarednapier opened this issue Feb 28, 2025 · 2 comments

Comments

@jarednapier
Copy link

Feature description

Currently the @latest option for the shadcn npm command installs the React 19 version of components. It would be nice to still be able to install the React 18 versions, whether that involves using an older version of the CLI tool or is just a new option.

Affected component/components

No response

Additional Context

Additional details here...

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues and PRs
@nilsbunger
Copy link

Specifically, I think we need instructions on installing for React 18 + Tailwind 3.

@shadcn
Copy link
Collaborator

shadcn commented Mar 6, 2025

We still support React 18 and Tailwind v3.

  • If you have an existing shadcn/ui project that is using React 18 and v3, the cli will install compatible components.
  • If you're starting a new project and prefer React 18 and v3, create your project by following the framework guide. Then npx shadcn@latest init will correctly detect your versions and install the compatible components.

I've tested this and it works. I've attached a recording below for Next.js 18 and Tailwind v3.

Notice that the cli properly uses tailwind.config.ts and install React 18 components (i.e with forwardRef...etc)

Give it a try. If you see any issues, ping me here. I'll help.

shadcn-react-18-tailwind-v3.mp4

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

No branches or pull requests

3 participants