Styling

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.

VariableDefault
--tambour-gap2px
--tambour-band-backgroundcurrentColor at 9%
--tambour-band-radius10px
--tambour-band-inset0
--tambour-wheel-flex1 1 0
--tambour-item-font-size21px
--tambour-item-colorcurrentColor at 55%
--tambour-disabled-opacity0.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#