Quick start
Include AppShell’s theme in your global CSS file:Theme colors
After including the theme, AppShell’s custom colors are available as Tailwind utility classes:Available color tokens
AppShell’s theme provides semantic color tokens that adapt to light and dark modes:Background and foreground
| Token | Purpose | Light Mode | Dark Mode |
|---|---|---|---|
background | Page background | Light gray | Dark gray |
foreground | Primary text | Dark gray | Light gray |
Interactive elements
| Token | Purpose |
|---|---|
primary | Primary actions and emphasis |
primary-foreground | Text on primary background |
secondary | Secondary actions |
secondary-foreground | Text on secondary background |
accent | Highlighted elements |
accent-foreground | Text on accent background |
Muted and subtle
| Token | Purpose |
|---|---|
muted | Subtle backgrounds |
muted-foreground | De-emphasized text |
Status and feedback
| Token | Purpose |
|---|---|
destructive | Dangerous actions (delete, remove) |
destructive-foreground | Text on destructive background |
Surfaces
| Token | Purpose |
|---|---|
card | Card backgrounds |
card-foreground | Text on cards |
popover | Popover backgrounds |
popover-foreground | Text on popovers |
Borders and inputs
| Token | Purpose |
|---|---|
border | Border color |
input | Input field borders |
ring | Focus ring color |
Sidebar
| Token | Purpose |
|---|---|
sidebar | Sidebar background |
sidebar-foreground | Sidebar text |
sidebar-primary | Active sidebar items |
sidebar-primary-foreground | Text on active items |
sidebar-accent | Hover state |
sidebar-accent-foreground | Text on hover |
sidebar-border | Sidebar borders |
Status colors
For status indicators and badges:Dark mode
AppShell includes built-in dark mode support. Toggle between themes using theuseTheme hook:
Available themes
"light"- Light theme"dark"- Dark theme"system"- Follow system preference (default)
Custom styling
Extending the theme
You can extend AppShell’s theme with your own colors:Override default colors
To customize AppShell’s default colors, override the CSS variables:AppShell component styling
Class prefix
AppShell components use aastw: prefix (AppShell TailWind) to avoid class name conflicts:
You don’t need to use the
astw: prefix in your own components—it’s only for AppShell’s internal components.Why the prefix?
Tailwind generates separate stylesheets for AppShell components and your application. The prefix prevents style definition order conflicts between these two stylesheets.Styling AppShell components
Many AppShell components accept aclassName prop for customization:
Typography
AppShell doesn’t enforce specific typography styles. Use Tailwind’s typography utilities:Responsive design
Use Tailwind’s responsive utilities with AppShell:Radius tokens
AppShell provides border radius tokens:Example: Custom component
Combining AppShell’s theme tokens:Best practices
Use semantic tokens
Prefer
text-foreground over text-gray-900 for theme consistencyRespect dark mode
Test components in both light and dark themes
Leverage Tailwind
Use Tailwind utilities instead of custom CSS when possible
Extend thoughtfully
Add custom colors only when semantic tokens don’t fit
Omitting the theme
If you omit@import "@tailor-platform/app-shell/theme.css", most of the UI will still work, but you’ll lose:
- Tailor Platform’s curated color palette
- Sidebar-specific color tokens
- Status color tokens
- Consistent dark mode colors
Related
Tailwind CSS
Official Tailwind CSS documentation
Components
Explore AppShell’s pre-built components