Bencho Originals
Traffic
Last 20 days
17,505visits
Sep 22Oct 11

Features

  • Direct, Search, Referral and Email stack above the line; Bounced hangs below it.
  • Each segment is a rounded block with a 2px gap, scaled to the busiest column.
  • Point at a column (or arrow to it) and it gets a ring, the rest step back, and a breakdown springs in beside it.
  • Day/Week regrows every bar left to right with a small stagger, and the total rolls digit by digit.
  • Mono draws the stack in shades of the foreground colour.
  • Sample data is generated from a fixed seed, so server and client render the same chart.

API reference

<StackedBars /> from components/bencho/stacked-bars.tsx

PropTypeDefaultDescription
barsnumber (8–24)20Number of columns.
gapnumber6Gap between columns, px.
monobooleanfalseShades of one colour instead of four hues.
defaultRange"day" | "week""day"Starting range.
outlinedbooleanfalseAdds a hairline ring around the card, for busy backgrounds.

Keyboard interactions

TabFocuses the range switch, then the chart.
← / →In the chart, previous or next column (shows its tooltip).
Home / EndFirst or last column.
EscapeHides the tooltip.
Enter / SpaceOn Day or Week, switches range.

Accessibility

  • The chart is a listbox with aria-activedescendant; each column is an option labelled like “Sep 27: 619 visits, 6 bounced”.
  • Day/Week is a radiogroup of radio buttons.
  • The tooltip is visual only; the same numbers are in the column's label.

Sound & haptics

Silent by design: no audio and no vibration. All of the feedback is visual, so it works anywhere, muted or not.

Files

Written from scratch for sher.md and inspired by bencho.dev. It contains none of bencho's code or assets.