The same parts, in any look.
tambour has a default look and no stylesheet to import. Set its variables, or style its parts with your own CSS. Here's one picker in five styles.
Site#
The look of this site. A neutral band, wider than the wheels, with muted rows around it.
Glass#
A translucent band with backdrop-blur. It needs something colorful behind it.
Neobrutalist#
A thick border and a hard offset shadow, added straight onto the band.
Terminal#
Monospace and sharp corners. Font family is inherited, so set it on the Root.
Soft#
A fully rounded band with a wide, diffuse shadow.
Variables#
Set these on the Root or any parent.
| Variable | Default |
|---|---|
--tambour-gap | 2px |
--tambour-band-background | currentColor at 9% |
--tambour-band-radius | 10px |
--tambour-band-inset | 0 |
--tambour-wheel-flex | 1 1 0 |
--tambour-item-font-size | 21px |
--tambour-item-color | currentColor at 55% |
--tambour-disabled-opacity | 0.5 |
Parts#
The parts are data-tambour-root, data-tambour-band, data-tambour-wheel and data-tambour-item, plus data-selected and data-disabled. The default styles have no specificity, so any CSS you write wins.
[data-tambour-band] { background: white; border-radius: 12px; }
[data-tambour-wheel] { flex: none; width: 64px; }
[data-tambour-item] { color: gray; font-size: 18px; }
[data-tambour-item][data-selected] { color: black; }Good to know#
- Cascade layers, including Tailwind's utilities, can't beat the defaults on the same property. Set a variable instead, like
[--tambour-band-background:white]. - Properties tambour doesn't set, like a border or shadow, work as usual.