Manual Installation
Add dependencies to your project manually.
Add Tailwind CSS
Components are styled using Tailwind CSS. You need to install Tailwind CSS in your project.
Follow the Tailwind CSS installation instructions to get started.
Add dependencies
Add the following dependencies to your project:
Configure path aliases
I use the ~
alias. This is how I configure it in tsconfig.json:
The ~
alias is a preference. You can use other aliases if you want, like @
or #
.
If you use a different alias such as @
, you'll need to update import statements when adding components.
Configure tailwind.config.ts
Here's what my tailwind.config.ts
file looks like:
Configure styles
Add the following to your styles/globals.css file. You can learn more about using CSS variables for theming in the theming section.
Add a cn helper
I use a cn
helper to make it easier to conditionally add Tailwind CSS classes. Here's how I define it in lib/utils.ts
:
That's it ✨
You can now start adding components to your project.