Skip to content

Dialog theming

Every cosmetic value Dialog renders is a --rozie-dialog-* custom property with a built-in fallback, so the component works with zero configuration and stays fully re-skinnable. The structural rules compile per-leaf and are not consumer-overridable — only the values below flow through tokens.

css
.rozie-dialog {
  --rozie-dialog-width: auto;
  --rozie-dialog-border: none;
  --rozie-dialog-backdrop-bg: rgba(0, 0, 0, 0.5);
  --rozie-dialog-padding: 1.5rem;
}

Tokens

box geometry

TokenDefault
--rozie-dialog-widthauto
--rozie-dialog-max-widthmin(32rem, calc(100vw - 2rem))
--rozie-dialog-max-heightcalc(100vh - 2rem)

box chrome

TokenDefault
--rozie-dialog-bordernone
--rozie-dialog-radius0.75rem
--rozie-dialog-bg#fff
--rozie-dialog-colorinherit
--rozie-dialog-shadow0 10px 38px rgba(0, 0, 0, 0.35), 0 0 1px rgba(0, 0, 0, 0.25)

scrim (the native ::backdrop)

TokenDefault
--rozie-dialog-backdrop-bgrgba(0, 0, 0, 0.5)
--rozie-dialog-backdrop-filternone

content panel

TokenDefault
--rozie-dialog-padding1.5rem
--rozie-dialog-fontinherit

enter/leave transition duration

TokenDefault
--rozie-dialog-transition0.15s ease

Design-system bridges

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

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

See also

Pre-1.0 — APIs may change between minor versions.