Skip to content

Design System

All visual properties are controlled by CSS custom properties (--vtk-*). Override them globally in :root, scoped to a container, or pass a ToastDesignTokens object as the theme prop.

Built-in themes

vue
<!-- Light (default) -->
<ToastContainer theme="light" />

<!-- Dark -->
<ToastContainer theme="dark" />

<!-- Follows prefers-color-scheme -->
<ToastContainer theme="system" />

Inline token overrides

Pass a ToastDesignTokens object to override specific tokens without touching global CSS:

vue
<ToastContainer
  :theme="{
    colorBg: '#1a1a2e',
    colorText: '#e2e8f0',
    colorSuccess: '#00ff88',
    colorError: '#ff4d6d',
    borderRadius: '16px',
    shadow: '0 8px 32px rgba(0, 0, 0, 0.5)',
    maxWidth: '360px',
  }"
/>

Full token reference

TokenCSS VariableDefault (light)Description
colorBg--vtk-color-bg#ffffffToast background
colorText--vtk-color-text#1a1a1aPrimary text color
colorBorder--vtk-color-borderrgba(0,0,0,0.08)Border color
colorSuccess--vtk-color-success#16a34aSuccess accent
colorError--vtk-color-error#dc2626Error accent
colorWarning--vtk-color-warning#d97706Warning accent
colorInfo--vtk-color-info#2563ebInfo accent
colorLoading--vtk-color-loading#7c3aedLoading accent
fontFamily--vtk-font-familysystem-uiFont stack
fontSize--vtk-font-size0.875remBase font size
fontWeight--vtk-font-weight400Base font weight
lineHeight--vtk-line-height1.4Line height
borderRadius--vtk-border-radius10pxCorner radius
borderWidth--vtk-border-width1pxBorder width
shadow--vtk-shadowmulti-layerBox shadow
paddingX--vtk-padding-x1remHorizontal padding
paddingY--vtk-padding-y0.75remVertical padding
iconSize--vtk-icon-size1.25remIcon size
progressHeight--vtk-progress-height3pxProgress bar height
maxWidth--vtk-max-width400pxMaximum toast width
minWidth--vtk-min-width280pxMinimum toast width
transitionDuration--vtk-transition-duration300msAnimation duration
transitionEasing--vtk-transition-easingeaseAnimation easing
zIndex--vtk-z-index9999Container z-index

Global CSS override

css
/* styles/toasts.css */
:root {
  --vtk-border-radius: 6px;
  --vtk-font-family: 'Inter', sans-serif;
  --vtk-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  --vtk-max-width: 360px;
}