Styling and cascade layers
vael-ui ships in @layer ui-components. Unlayered CSS always wins over a layer regardless of specificity, so a plain, unlayered base reset silently overrides vael-ui internals. Fix: put your base styles in a layer too, ordered first.
Layer order
/* your app's main stylesheet, e.g. style.css */
@layer app-base, ui-components;
@layer app-base {
* { margin: 0; box-sizing: border-box; }
button, input, textarea, select { font: inherit; }
}// main.ts
import './style.css' // your base layer, loads first
import 'vael-ui/style.css' // now sorts after app-baseTwo files, that's it. Import order here only controls layer position, nothing else, an unlayered override anywhere always still wins regardless of load order.
Deliberately overriding one component (ui prop, a Tailwind utility) wants your rule to win, keep that CSS unlayered as it already is by default. See Using with Tailwind.
CSS variables
Every color, radius, shadow, and motion value in vael-ui reads from a CSS custom property. Override any of them in your own unlayered stylesheet:
/* your own global stylesheet, unlayered so it always wins */
:root {
--ui-primary: #6366f1;
--ui-radius: 6px;
}ConfigProvider's theme prop covers primary, danger, and radius for dynamic, JS-driven theming. Everything else here is CSS-only.
Colors
| Variable | Default | Description |
|---|---|---|
--ui-primary | #18181b | Primary action color (buttons, links, focus accents). |
--ui-primary-hover | #27272a | Hover state for the primary color. |
--ui-primary-contrast | #fafafa | Text/icon color on top of the primary color. |
--ui-muted | #f4f4f5 | Subtle background for secondary surfaces. |
--ui-muted-hover | #e4e4e7 | Hover state for muted backgrounds. |
--ui-danger | oklch(0.586 0.253 26) | Destructive/error color. |
--ui-danger-hover | — | Hover state for this color. |
--ui-danger-contrast | #ffffff | Text/icon color on top of this color. |
--ui-success | oklch(71.335% 0.15901 160.899) | Success color. |
--ui-success-hover | — | Hover state for this color. |
--ui-success-contrast | #ffffff | Text/icon color on top of this color. |
--ui-warning | oklch(0.666 0.179 58.315) | Warning color. |
--ui-warning-hover | — | Hover state for this color. |
--ui-warning-contrast | #ffffff | Text/icon color on top of this color. |
--ui-info | #2563eb | Informational color. |
--ui-info-hover | #1d4ed8 | Hover state for this color. |
--ui-info-contrast | #ffffff | Text/icon color on top of this color. |
--ui-surface | #ffffff | Base background for panels, cards, and dialogs. |
--ui-text | #18181b | Primary text color. |
--ui-text-muted | #71717a | Secondary/muted text color. |
--ui-border | #e4e4e7 | Default border color. |
--ui-border-strong | #d4d4d8 | Stronger border color for emphasized edges. |
--ui-overlay | rgb(0 0 0 / 0.4) | Backdrop color behind modals and dialogs. |
Shape
| Variable | Default | Description |
|---|---|---|
--ui-radius | 10px | Base corner radius for controls (buttons, inputs, badges). |
--ui-radius-surface | min(var(--ui-radius), 1rem) | Capped corner radius for large surfaces (panels, cards, tables), so an aggressive radius choice can't turn them into a stadium shape. |
Elevation & layering
| Variable | Default | Description |
|---|---|---|
--ui-z-dialog | 50 | Stacking order for dialogs. |
--ui-z-popover | 55 | Stacking order for popovers, menus, and selects. |
--ui-z-toast | 60 | Stacking order for toasts. |
--ui-z-tooltip | 70 | Stacking order for tooltips (topmost). |
--ui-panel-shadow | 0 0 0 1px …, 0 8px 24px …, 0 24px 48px … | Drop shadow for floating panels. |
Motion
| Variable | Default | Description |
|---|---|---|
--ui-ease-out | cubic-bezier(0.23, 1, 0.32, 1) | Default easing for entering/settling transitions. |
--ui-ease-in-out | cubic-bezier(0.77, 0, 0.175, 1) | Easing for on-screen movement (resize, reposition). |
--ui-ease-drawer | cubic-bezier(0.32, 0.72, 0, 1) | Easing for edge-anchored slides (drawers, sheets). |
--ui-duration-drawer | 500ms | Duration for drawer/sheet slide transitions. |
--ui-duration-press | 160ms | Duration for press/tap feedback. |
--ui-duration-enter | 200ms | Duration for enter/open transitions. |
--ui-duration-exit | 150ms | Duration for exit/close transitions. |
--ui-duration-tooltip | 125ms | Duration for tooltip open. |
--ui-duration-tooltip-exit | 100ms | Duration for tooltip close. |
--ui-duration-toast | 400ms | Duration for toast enter. |
--ui-duration-toast-exit | 200ms | Duration for toast exit. |
--ui-ease-toast | ease | Easing for toast transitions. |
--ui-toast-offset | 1rem | Edge offset for the toast stack. |