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:
Add icon library
If you’re using the default
style, install @ng-icons/lucide
:
If you’re using the new-york
style, install @ng-icons/radix-icons
:
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.
If you use a different alias such as ~, you’ll need to update import statements when adding components.
Here’s what my tailwind.config.js
file looks like:
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.