Skip to content

Scroll bar

⋯

The Figma Scroll Bar is a CSS class, not a React component. Add scrollbar-nesra to any element that scrolls. It styles both the vertical and the horizontal bar.

<div className="scrollbar-nesra h-64 overflow-y-auto">…</div>

The class ships in @nesra/ui/styles. It needs no Tailwind @source entry.

  • Campaign 1
  • Campaign 2
  • Campaign 3
  • Campaign 4
  • Campaign 5
  • Campaign 6
  • Campaign 7
  • Campaign 8
  • Campaign 9
  • Campaign 10
  • Campaign 11
  • Campaign 12
  • Campaign 13
  • Campaign 14
  • Campaign 15
  • Campaign 16
  • Campaign 17
  • Campaign 18
  • Campaign 19
  • Campaign 20
  • Campaign 21
  • Campaign 22
  • Campaign 23
  • Campaign 24
Campaign 1Campaign 2Campaign 3Campaign 4Campaign 5Campaign 6Campaign 7Campaign 8Campaign 9Campaign 10Campaign 11Campaign 12

Figma Scroll Bar has Orientation=Vertical and Orientation=Horizontal. Both use the same values.

Part Figma value CSS
Track 14px thick --nesra-unit-6
Track Surface/card-bg-gray, radius-full --nesra-surface-card-bg-gray, --nesra-radius-full
Thumb 6px thick, inset spacing-xs (4px) each side 4px transparent border on the 14px thumb (--nesra-spacing-xs)
Thumb Icon/icon-disabled, radius-full --nesra-icon-disabled, --nesra-radius-full

Both color roles have Light and Dark values. The bars were checked in both modes.

  • Hover. Figma has no hover state. The thumb changes to --nesra-icon-muted on hover.
  • Corner. Figma has no corner where two bars meet. The corner is transparent.
  • Thumb length. Figma draws a 200px thumb. The browser sets the thumb length from the content size.
  • Chromium and Safari draw the exact Figma sizes through ::-webkit-scrollbar.
  • Firefox supports only scrollbar-width and scrollbar-color. It draws its own thin bar with the same thumb and track colors, but not the Figma sizes.

The class changes appearance only. A scroll container that holds no focusable content needs tabIndex={0} and an accessible name so keyboard users can scroll it, as in the example.