Create project
Start by creating a new Remix project using create-remix:
Run the CLI
Run the shadcn init command to setup your project:
You will be asked a few questions to configure components.json.
Ignore them if you want to use Pure UI Design System.
App structure
- 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:
Add tailwind.css to your app
In your app/root.tsx file, import the tailwind.css file:
Enter license
Enter your license key to unlock the full features of Pure UI:
Initialize design system
Use Design System to learn and initialize your own design system or start with the default theme:
Add components
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: