Skip to content

Listbox theming ​

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

css
:root {
  --rozie-listbox-min-width: 12rem;
  --rozie-listbox-bg: #fff;
  --rozie-listbox-accent: #0066cc;
  --rozie-listbox-arrow-color: currentColor;
}

Tokens ​

layout / typography ​

TokenDefault
--rozie-listbox-min-width12rem
--rozie-listbox-fontinherit
--rozie-listbox-gap0.5rem
--rozie-listbox-control-padding0.5rem 0.75rem

control + popup surface ​

TokenDefault
--rozie-listbox-bg#fff
--rozie-listbox-fg#1a1a1a
--rozie-listbox-borderrgba(0, 0, 0, 0.2)
--rozie-listbox-border-width1px
--rozie-listbox-radius6px
--rozie-listbox-placeholderrgba(0, 0, 0, 0.45)
--rozie-listbox-disabled-opacity0.6

focus ring (defaults to accent) ​

TokenDefault
--rozie-listbox-accent#0066cc
--rozie-listbox-ring-width2px
--rozie-listbox-ring-offset1px

trailing arrow (select-only trigger) ​

TokenDefault
--rozie-listbox-arrow-colorcurrentColor
--rozie-listbox-arrow-opacity0.7
TokenDefault
--rozie-listbox-popup-padding0.25rem
--rozie-listbox-popup-offset4px
--rozie-listbox-shadow0 6px 24px rgba(0, 0, 0, 0.12)
--rozie-listbox-z1000
--rozie-listbox-max-height16rem

options ​

TokenDefault
--rozie-listbox-option-padding0.4rem 0.6rem
--rozie-listbox-option-radius4px
--rozie-listbox-option-fginherit
--rozie-listbox-active-bgrgba(0, 102, 204, 0.12)
--rozie-listbox-active-fginherit
--rozie-listbox-selected-bgtransparent
--rozie-listbox-selected-fginherit
--rozie-listbox-selected-weight600
--rozie-listbox-check'✓'
--rozie-listbox-empty-fgrgba(0, 0, 0, 0.5)

Defaulted where Listbox 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-listbox-check-colorvar(--rozie-listbox-accent, #0066cc)
--rozie-listbox-popup-bgvar(--rozie-listbox-bg, #fff)
--rozie-listbox-popup-bordervar(--rozie-listbox-border, rgba(0, 0, 0, 0.15))
--rozie-listbox-popup-radiusvar(--rozie-listbox-radius, 6px)
--rozie-listbox-ringvar(--rozie-listbox-accent, #0066cc)

Design-system bridges ​

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

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

See also ​

Pre-1.0 — APIs may change between minor versions.