CSS framework
Components are styled using Tailwind CSS and Uno CSS. You need to install Tailwind CSS or Uno CSS in your project.
Follow the Tailwind or Uno installation instructions to get started.
Add dependencies
Add the following dependencies to your project if your are using tailwind:
or uno:
Path Aliases
I'm use the @
alias to make it easier to import your components. This is how you can configure it:
If you prefer to use a different alias than @
, you'll need to update the import
statements when adding components.
This is what this project's tailwind.config.cjs
file looks like:
or uno.config.ts
Add the following to your src/app.css
file. You can learn more about using CSS variables for theming in the theming section.
if you are using uno:
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 src/libs/cn.ts
:
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: