Installation
Remix
Install and configure shadcn/ui for Remix.
Note: The following guide is for Tailwind v4. If you are using Tailwind
v3, use shadcn@2.3.0.
Note: This guide is for Remix. For React Router, see the React Router guide.
App structure
Note: This app structure is only a suggestion. You can place the files wherever you want.
- Place the UI components in the
app/components/uifolder. - Your own components can be placed in the
app/componentsfolder. - The
app/libfolder contains all the utility functions. We have autils.tswhere we define thecnhelper. - The
app/tailwind.cssfile contains the global CSS.
Install Tailwind CSS
Then we create a postcss.config.js file:
And finally we add the following to our remix.config.js file:
That's it
You can now start adding components to your project.
The command above will add the Button component to your project. You can then import it like this: