Skip to content

Toaster theming ​

The values listed below are exposed as --rozie-toast-* custom properties, each with a built-in fallback, so Toaster works with zero configuration and re-skins by remapping tokens. The structural rules compile per-leaf and are not consumer-overridable.

css
:root {
  --rozie-toast-z: 9999;
  --rozie-toast-content-gap: 0.75rem;
  --rozie-toast-success-bg: #16a34a;
  --rozie-toast-font-size: 0.9rem;
}

Tokens ​

region layout ​

TokenDefault
--rozie-toast-z9999
--rozie-toast-gap0.5rem
--rozie-toast-region-padding1rem
--rozie-toast-max-widthcalc(100vw - 2rem)
--rozie-toast-fontinherit

per-toast box model ​

TokenDefault
--rozie-toast-content-gap0.75rem
--rozie-toast-min-width16rem
--rozie-toast-toast-max-width24rem
--rozie-toast-padding0.75rem 1rem
--rozie-toast-color#fff
--rozie-toast-bg#333
--rozie-toast-radius0.5rem
--rozie-toast-shadow0 6px 20px rgba(0, 0, 0, 0.25)

per-type accents ​

TokenDefault
--rozie-toast-success-bg#16a34a
--rozie-toast-error-bg#dc2626
--rozie-toast-warning-bg#ca8a04

message + close button ​

TokenDefault
--rozie-toast-font-size0.9rem
--rozie-toast-close-size1.25rem
--rozie-toast-close-opacity0.75

enter/exit lifecycle ​

TokenDefault
--rozie-toast-enter-duration200ms
--rozie-toast-exit-duration200ms

stacked mode (opt-in stacked prop) — collapsed depth transform ​

TokenDefault
--rozie-toast-stack-offset8px
--rozie-toast-stack-scale-step0.05
--rozie-toast-depth0
--rozie-toast-swipe-exit1

the decorative 'loading' type spinner ​

TokenDefault
--rozie-toast-spinner-size1em
--rozie-toast-spinner-colorcurrentColor

Defaulted where Toaster reads them ​

Public, but declared nowhere by base.css: the fallback below applies only while no scope sets the token, and it is resolved at the component itself — so it follows a value set on any ancestor (a token it defaults to included).

TokenDefault
--rozie-toast-info-bgvar(--rozie-toast-bg, #333)

Design-system bridges ​

Each package ships token presets that map Toaster's tokens onto a known design system's published CSS variables — import base.css first, then a bridge:

ts
import '@rozie-ui/toast-react/themes/base.css';
import '@rozie-ui/toast-react/themes/bootstrap.css';
import '@rozie-ui/toast-react/themes/material.css';
import '@rozie-ui/toast-react/themes/shadcn.css';

See also ​

Pre-1.0 — APIs may change between minor versions.