Skip to content

Scrollbar

Two scrollbar mixins — neutral and branded. Both support float and track modes, and handle Firefox via scrollbar-width and scrollbar-color.

Apply to the scrolling container element.


Neutral scrollbar using neutral scale colors. Works anywhere without introducing brand color into unexpected places:

@include scrollbar; // 6px, float
@include scrollbar(8px); // wider, float
@include scrollbar(6px, false); // with visible track
ParameterDefaultDescription
$width6pxScrollbar width and height
$floattrueFloat mode — transparent track

Branded scrollbar using interactive color tokens. Use where the scrollbar is a deliberate design element:

@include scrollbar-themed; // 6px, float
@include scrollbar-themed(8px); // wider, float
@include scrollbar-themed(6px, false); // with visible track
ParameterDefaultDescription
$width6pxScrollbar width and height
$floattrueFloat mode — transparent track

Controls whether the track is visible:

$float: true — transparent track, thumb appears to float over content. Clean, minimal. Default:

│▓▓│ ← thumb only, no track visible
│ │
│ │

$float: false — visible track with inset shadow. More traditional, track clearly shows scrollable area:

│██│ ← visible track
│██│
│▓▓│ ← thumb

Firefox uses scrollbar-width and scrollbar-color which have limited customisation. The firefox-width() helper maps pixel values to Firefox keywords:

WidthFirefox value
0pxnone
< 4pxthin
≥ 4pxauto