Installation
Here's everything you need to get started
Install TailwindCSS
Depending on your project, steps to install Tailwind may vary. Check out their installation page for guidance.
Install Required Dependencies
This project requires the following packages:
Install Icons
Draft UI uses Lucide Icons by default. You can use whichever library you prefer, but you'll need to replace the default icons manually.
Configure Path Aliases
Draft UI uses the path alias
@/*
by default. If you want to use a different alias, you'll need to update your components.Configure Tailwind
Make sure to include the
tailwindcss-animate
plugin.Configure CVA
Add
twMerge
to yourcva.config.ts
. This way, anytime you use thecx(...)
function any conflicting Tailwind classes will be gracefully resolved.Configure Routing (recommended)
Many components use built-in
Link
components to handle navigation. By default, these links perform native browser navigation when they are interacted with.In order for these links to work as expected with whichever framework you're using, wrap your application using React Aria's
RouterProvider
component.Next.js AppNext.js PagesRemixReact RouterFor more information, go to the React Aria Client Side Routing.
Configure @sly-cli/sly (optional)
If your installation varies from any of the configs described above (like if your components are in a different location) you'll want to update your
sly.json
to make sure your CLI installs work correctly.Go to the CLI page to learn more.
All Done!
Now you're ready to start building your application!