Skip to content

Tags theming

Every cosmetic value Tags renders is a --rozie-tags-* 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-tags {
  --rozie-tags-gap: 0.4rem;
  --rozie-tags-accent: #0066cc;
  --rozie-tags-chip-gap: 0.3rem;
  --rozie-tags-remove-size: 1.1rem;
}

Tokens

control box

TokenDefault
--rozie-tags-gap0.4rem
--rozie-tags-padding0.35rem 0.45rem
--rozie-tags-fontinherit
--rozie-tags-colorinherit
--rozie-tags-bg#fff
--rozie-tags-border-width1px
--rozie-tags-border-colorrgba(0, 0, 0, 0.25)
--rozie-tags-radius0.5rem
--rozie-tags-min-width12rem

accent — the single color most consumers will set (focus ring)

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

chip

TokenDefault
--rozie-tags-chip-gap0.3rem
--rozie-tags-chip-padding0.15rem 0.5rem
--rozie-tags-chip-font-size0.85rem
--rozie-tags-chip-colorinherit
--rozie-tags-chip-bgrgba(0, 102, 204, 0.12)
--rozie-tags-chip-radius0.375rem

chip remove button

TokenDefault
--rozie-tags-remove-size1.1rem
--rozie-tags-remove-colorcurrentColor
--rozie-tags-remove-opacity0.65
--rozie-tags-remove-hover-bgrgba(0, 0, 0, 0.1)

inline text input

TokenDefault
--rozie-tags-input-min4rem
--rozie-tags-input-padding0.15rem 0.1rem
--rozie-tags-placeholder-colorrgba(0, 0, 0, 0.4)

disabled

TokenDefault
--rozie-tags-disabled-opacity0.6
--rozie-tags-disabled-bgrgba(0, 0, 0, 0.04)

Design-system bridges

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

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

See also

Pre-1.0 — APIs may change between minor versions.