About this set
Dashboard tabs where each tab is a small KPI card: a label, a large value and the change since last period, with Revenue, Active users and Churn as the examples. Selecting a card opens a panel below with a short explanation and a seven-bar sparkline whose last bar is highlighted. Use it at the top of an analytics or admin page, where people want the headline numbers at a glance and the detail one click away. On screens under 520 pixels the three cards stack into compact rows with the value and change on one line. The change arrows are hidden from screen readers and replaced by the words up or down, so a tab reads as Revenue, $48.2k, up 12.4%. The plain CSS version is a radio group with :has() choosing the panel; the Bootstrap version is a .nav-pills laid out as a grid and driven by the Tab plugin; the Tailwind version uses group-aria-selected utilities and a small WAI-ARIA tabs script.
What’s included
- Each tab shows a KPI label, value and change
- Arrows are read as up or down, not as symbols
- Sparkline panel with the latest bar highlighted
- Cards stack into rows under 520px
- Green and red change colours darkened to pass 4.5:1 on the selected tint
Accessibility
In the plain CSS version the tabs are a radio group, not ARIA tabs: the radios sit inside an element with role="radiogroup" and an aria-label, each takes its name from its visible label, Tab enters the group and the arrow keys move the selection (radios have no Home or End). In the Bootstrap and Tailwind versions they follow the WAI-ARIA tabs pattern: role tablist, tab and tabpanel, aria-selected, aria-controls, a roving tabindex, arrow keys plus Home and End. The sparklines are aria-hidden because the panel text states the trend. Focus shows a 2px indigo outline and the hover transition is removed under prefers-reduced-motion.
Customise it
The selected tint #eef2ff and accent #4f46e5 live in the .tabs rules (plain CSS), in --bs-nav-pills-link-active-bg on .tabs (Bootstrap) and in the --color-tab-tint and --color-tab-accent theme colours (Tailwind). Change the up and down colours in .d and .d.down or --color-tab-up and --color-tab-down.

















