Skip to main content
AppShell uses Tailwind CSS v4 for styling and provides a curated theme with Tailor Platform’s color palette and design tokens. All AppShell components are styled with Tailwind utility classes.

Quick start

Include AppShell’s theme in your global CSS file:
The import order matters! Import AppShell’s theme before Tailwind to ensure proper CSS variable definitions.

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

Interactive elements

Muted and subtle

Status and feedback

Surfaces

Borders and inputs

Status colors

For status indicators and badges:

Dark mode

AppShell includes built-in dark mode support. Toggle between themes using the useTheme 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:
Use in components:

Override default colors

To customize AppShell’s default colors, override the CSS variables:

AppShell component styling

Class prefix

AppShell components use a astw: 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 a className 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:
Use in Tailwind:

Example: Custom component

Combining AppShell’s theme tokens:

Best practices

Use semantic tokens

Prefer text-foreground over text-gray-900 for theme consistency

Respect 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
While optional, including the theme is strongly recommended for a cohesive design experience.

Tailwind CSS

Official Tailwind CSS documentation

Components

Explore AppShell’s pre-built components