Skip to content

Carousel theming

Every cosmetic value Carousel renders is a --rozie-embla-* 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-embla {
  --rozie-embla-accent: #1a1a1a;
  --rozie-embla-arrow-size: 2.25rem;
  --rozie-embla-dots-gap: 0.4rem;
  --rozie-embla-thumbs-gap: 0.5rem;
}

Tokens

accent — the shared selected/active color. Arrow-fg, dot-selected-bg and thumb-selected-border-color all fall back to this ONE token, so overriding just --rozie-embla-accent shifts every "selected" affordance at once.

TokenDefault
--rozie-embla-accent#1a1a1a

arrows (opt-in via arrows)

TokenDefault
--rozie-embla-arrow-size2.25rem
--rozie-embla-arrow-radius50%
--rozie-embla-arrow-bgrgb(255 255 255 / 0.9)
--rozie-embla-arrow-hover-bg#fff
--rozie-embla-arrow-fgvar(--rozie-embla-accent)
--rozie-embla-arrow-font-size1.5rem
--rozie-embla-arrow-shadow0 1px 4px rgb(0 0 0 / 0.25)
--rozie-embla-arrow-disabled-opacity0.35
--rozie-embla-arrow-inset0.5rem

dot pagination (opt-in via dots)

TokenDefault
--rozie-embla-dots-gap0.4rem
--rozie-embla-dots-padding0.625rem 0
--rozie-embla-dot-size0.5rem
--rozie-embla-dot-bgrgb(0 0 0 / 0.25)
--rozie-embla-dot-hover-bgrgba(0, 0, 0, 0.45)
--rozie-embla-dot-selected-bgvar(--rozie-embla-accent)
--rozie-embla-dot-selected-scale1.25

synced thumbnail strip (opt-in via thumbnails)

TokenDefault
--rozie-embla-thumbs-gap0.5rem
--rozie-embla-thumb-gap0.5rem
--rozie-embla-thumb-opacity0.5
--rozie-embla-thumb-hover-opacity0.8
--rozie-embla-thumb-selected-opacity1
--rozie-embla-thumb-border-width2px
--rozie-embla-thumb-border-colortransparent
--rozie-embla-thumb-radius4px
--rozie-embla-thumb-selected-border-colorvar(--rozie-embla-accent)

Design-system bridges

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

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

See also

Pre-1.0 — APIs may change between minor versions.