Skip to content

Combobox theming

Every cosmetic value Combobox renders is a --rozie-combobox-* 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-combobox {
  --rozie-combobox-width: 16rem;
  --rozie-combobox-accent: #0066cc;
  --rozie-combobox-input-padding: 0.5rem 0.75rem;
  --rozie-combobox-focus-ring-width: 3px;
}

Tokens

layout / typography

TokenDefault
--rozie-combobox-width16rem
--rozie-combobox-fontinherit

accent — the single color most consumers will set; focus ring + selected option derive from it

TokenDefault
--rozie-combobox-accent#0066cc

input box model

TokenDefault
--rozie-combobox-input-padding0.5rem 0.75rem
--rozie-combobox-colorinherit
--rozie-combobox-bg#fff
--rozie-combobox-border-width1px
--rozie-combobox-border-colorrgba(0, 0, 0, 0.25)
--rozie-combobox-radius0.5rem

focus ring

TokenDefault
--rozie-combobox-focus-ring-width3px
--rozie-combobox-focus-ring-colorrgba(0, 102, 204, 0.25)
--rozie-combobox-focus-border-colorvar(--rozie-combobox-accent, #0066cc)

disabled

TokenDefault
--rozie-combobox-disabled-opacity0.55
--rozie-combobox-disabled-bgrgba(0, 0, 0, 0.04)
TokenDefault
--rozie-combobox-list-z50
--rozie-combobox-list-gap0.25rem
--rozie-combobox-list-padding0.25rem
--rozie-combobox-list-max-height16rem
--rozie-combobox-list-bg#fff
--rozie-combobox-list-border-colorrgba(0, 0, 0, 0.15)
--rozie-combobox-list-shadow0 10px 24px rgba(0, 0, 0, 0.16)

option

TokenDefault
--rozie-combobox-option-padding0.4rem 0.6rem
--rozie-combobox-option-radius0.375rem
--rozie-combobox-option-active-bgrgba(0, 102, 204, 0.12)
--rozie-combobox-option-selected-weight600
--rozie-combobox-option-selected-colorvar(--rozie-combobox-accent, #0066cc)
--rozie-combobox-option-disabled-opacity0.45
--rozie-combobox-option-colorinherit

group heading — the label rendered above a <optgroup>-style block of options when the options array is grouped

TokenDefault
--rozie-combobox-group-heading-colorrgba(0, 0, 0, 0.5)
--rozie-combobox-group-heading-letter-spacing0.03em
--rozie-combobox-group-heading-margin-top0
--rozie-combobox-group-heading-padding0.35rem 0.6rem 0.15rem
--rozie-combobox-group-heading-size0.75rem
--rozie-combobox-group-heading-transformuppercase
--rozie-combobox-group-heading-weight600

empty state — rendered when the filtered options list has zero entries

TokenDefault
--rozie-combobox-empty-colorrgba(0, 0, 0, 0.5)
--rozie-combobox-empty-padding0.5rem 0.6rem

overflow — the "+N more" affordance shown when the selection exceeds the visible chip count

TokenDefault
--rozie-combobox-more-colorrgba(0, 0, 0, 0.55)
--rozie-combobox-more-size0.875rem

state-dependent — declared initial on purpose. The component reads this token with a DIFFERENT local fallback at each read site (resting input falls back through --rozie-combobox-border-color, the :focus rule falls back through --rozie-combobox-focus-border-color), so declaring a single frozen value here would collapse the focus-state transition. initial resets the custom property to the guaranteed-invalid value, which makes every var() substitute its OWN local fallback — exactly today's render output, but now discoverable and overridable.

TokenDefault
--rozie-combobox-input-underlineinitial

Design-system bridges

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

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

See also

Pre-1.0 — APIs may change between minor versions.