customCss prop. You can pass a string of CSS declarations or a key-value object — both formats work.
Match your brand colours
Override the primary colour and its interactive states:Set the border radius style
Rounded theme:Set the font family
Configure dark mode
Use thetheme prop for light/dark/auto. If you need to override colours for a specific theme, combine theme with customCss:
Advanced: glassmorphism
Advanced: disable default CSS
To apply a fully custom stylesheet without Trails’ defaults interfering:Global CSS overrides
Variables cascade as normal CSS custom properties. You can set them globally or scope them to a container:CSS variable reference
Typography
| Variable | Default |
|---|---|
--trails-font-family | ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif |
Border radius
| Variable | Applies to | Default |
|---|---|---|
--trails-border-radius-widget | Main widget container | 32px |
--trails-border-radius-button | Primary buttons | 24px |
--trails-border-radius-input | Input fields | 24px |
--trails-border-radius-dropdown | Dropdown menus | 12px |
--trails-border-radius-container | Generic containers | 8px |
--trails-border-radius-list | Token lists | 8px |
--trails-border-radius-list-button | List item buttons | 12px |
--trails-border-radius-large-button | Large action buttons | 16px |
Widget structure
| Variable | Default |
|---|---|
--trails-widget-border | none |
--trails-shadow | 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1) |
Primary colours
| Variable | Default |
|---|---|
--trails-primary | rgb(59 130 246) |
--trails-primary-hover | rgb(37 99 235) |
--trails-primary-disabled | rgb(209 213 219) |
--trails-primary-disabled-text | rgb(107 114 128) |
Background colours
| Variable | Default |
|---|---|
--trails-bg-primary | rgb(255 255 255) |
--trails-bg-secondary | rgb(249 250 251) |
--trails-bg-tertiary | rgb(243 244 246) |
--trails-bg-card | rgb(255 255 255) |
--trails-bg-overlay | rgb(255 255 255) |
Text colours
| Variable | Default |
|---|---|
--trails-text-primary | rgb(17 24 39) |
--trails-text-secondary | rgb(75 85 99) |
--trails-text-tertiary | rgb(107 114 128) |
--trails-text-muted | rgb(156 163 175) |
--trails-text-inverse | rgb(255 255 255) |
Border colours
| Variable | Default |
|---|---|
--trails-border-primary | rgb(229 231 235) |
--trails-border-secondary | rgb(209 213 219) |
--trails-border-tertiary | rgb(243 244 246) |
Interactive states
| Variable | Default |
|---|---|
--trails-hover-bg | rgb(243 244 246) |
--trails-hover-text | rgb(17 24 39) |
--trails-focus-ring | rgb(59 130 246) |
Status colours
| Variable | Default |
|---|---|
--trails-success-bg | rgb(240 253 244) |
--trails-success-text | rgb(22 163 74) |
--trails-success-border | rgb(187 247 208) |
--trails-warning-bg | rgb(255 251 235) |
--trails-warning-text | rgb(217 119 6) |
--trails-warning-border | rgb(253 230 138) |
--trails-error-bg | rgb(254 242 242) |
--trails-error-text | rgb(220 38 38) |
--trails-error-border | rgb(254 202 202) |
Input fields
| Variable | Default |
|---|---|
--trails-input-bg | rgb(255 255 255) |
--trails-input-border | rgb(209 213 219) |
--trails-input-text | rgb(17 24 39) |
--trails-input-placeholder | rgb(156 163 175) |
--trails-input-focus-border | rgb(59 130 246) |
--trails-input-focus-ring | rgb(59 130 246) |
Dropdowns
| Variable | Default |
|---|---|
--trails-dropdown-bg | rgb(255 255 255) |
--trails-dropdown-border | rgb(229 231 235) |
--trails-dropdown-text | rgb(17 24 39) |
--trails-dropdown-hover-bg | rgb(249 250 251) |
--trails-dropdown-selected-bg | rgb(243 244 246) |
--trails-dropdown-selected-text | rgb(17 24 39) |
--trails-dropdown-focus-border | rgb(59 130 246) |
Lists
| Variable | Default |
|---|---|
--trails-list-bg | rgb(255 255 255) |
--trails-list-border | rgb(229 231 235) |
--trails-list-hover-bg | rgb(249 250 251) |