Prerequisites
The starter kit comes pre-configured with ShadCN. The configuration is stored inpackages/ui/components.json:
packages/ui/components.json
Adding a Component
Choose a component
Browse the ShadCN UI component library to find the component you want to add.Popular components include:
- Button
- Input
- Dialog
- Dropdown Menu
- Tabs
- Toast
- Form
Run the add command
Use the ShadCN CLI to add the component. The Replace
-c flag specifies the app directory:button with the name of any component you want to add.Using Components
Once installed, you can import and use components in your React pages:app/users/ui/pages/example.tsx
Component Customization
Customize styles
All ShadCN components use Tailwind CSS classes. You can customize them by modifying the component files in
packages/ui/components/ui/.Modify component defaults
Each component file can be edited directly to change default behavior or styles:
packages/ui/components/ui/button.tsx
Working with Forms
ShadCN form components work seamlessly with AdonisJS validation:Useful Component Combinations
Data Tables
Data Tables
Modal Dialogs
Modal Dialogs
Navigation
Navigation
Notifications
Notifications
Theme Configuration
The starter kit uses the New York style with the Neutral base color. You can change this by modifyingpackages/ui/components.json:
Icon Library
The starter kit uses Lucide Icons:Resources
ShadCN Documentation
Official ShadCN UI documentation
Component Examples
Browse all available components
ShadCN Blocks
Pre-built component compositions
Lucide Icons
Complete icon library