Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Analytics Widget Dashboard Features Block for React

A job-queue dashboard drawn as a window in a hairline frame: a range control in its title bar re-draws the throughput line and re-reads the uptime and outcome figures, beside a seven-bar week.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

A dashboard feature section for React with Base UI, written for Queuebank, a fictional job-queue monitor. A window in a hairline frame, with + marks on its corners, holds four widgets that share their lines: a wide line chart of jobs per minute with its average and its change, an uptime figure over a strip of thirty days, a seven-bar week and a donut that splits the jobs into first-try successes, retries and failures. The window's title bar has a segmented range control, 24h, 7d and 30d: choosing a range re-draws the line from that range's data, rolls the average and the uptime to their new values and re-cuts the donut, while every widget keeps its height. Everything is drawn in foreground tones from your theme's tokens (the charts are plain SVG and CSS, the numbers roll with Sliding Number), so no widget uses your primary colour. For monitoring, analytics and operations products whose pitch is that the answer is already on screen.

FAQ

How do I put my own data in?

Edit RANGES at the top of the file. Each range has its points (jobs per minute, as many as you like), the uptime in hundredths of a percent (9998 is 99.98%), the firstTry and retried shares in percent, and the labels it shows. The average, the change, the peak, the chart's scale and the share of failed jobs are all derived from those numbers. The seven bars come from WEEK and the degraded days in the uptime strip from DEGRADED.

Why are the charts hand-drawn instead of using a chart library?

They are an SVG polyline, a few CSS bars and three circle arcs, with every colour a foreground tone, so they follow any theme and light or dark mode, weigh next to nothing and render on the server. Each chart is an image with a text alternative built from its data, so a screen reader hears the range, the first and last values and the peak.

How does the range control work?

It is a segmented control named "Range". The arrow keys move between the three ranges and the choice applies at once; the chart and the figures change, and nothing around them moves, because the charts have fixed heights and the figures keep their width.

What happens in a right-to-left page?

The window mirrors like any interface, but the charts keep their direction: time runs left to right in the line, the bars and the uptime strip, as it does in most right-to-left products, so each is set to dir="ltr". Figures with a sign or a unit sit in bdi elements so they keep their order.

How does it fit on a phone?

The widgets stack in one column and the charts get shorter (h-40). The title bar keeps the product name and the range control on one line. On a tablet the line chart takes a row of its own, the uptime and the week sit side by side and the donut takes the last row.

What moves, and what happens with reduced motion?

The header fades up once on load and the digits of the average and the uptime roll when the range changes, both with CSS transitions. With reduced motion the digits change in place and nothing animates.

  • Pro

    A metrics console in a card in a card that follows your theme: six metric tiles with a value, a signed change and a sparkline are the tabs of one tablist, and choosing one opens a larger chart of its series in a strip below.

  • Pro

    Gauge Cluster Features

    Metrics and charts

    Three semicircle gauges in one framed band, driven by a single "Simulate load" slider: CPU, memory and queue wait, each with a needle, an arc, a reading and a state.

  • Pro

    A bento of six kinds of cell for a field-service app, each a box with its lines running past the corners: a job list, a rolling figure, avatars with presence, a code window, live switches and a step tracker.

  • Pro

    Dashboard Preview Hero

    Product windows

    A showcase hero with a headline, a Shine Button, an outline button and a trust line above a wide browser window in a hairline frame, a greyscale sketch of an analytics dashboard that runs on below the fold.

  • Pro

    A 24 by 12 traffic density grid in a framed figure with a legend, three numbered callout cells, and the callouts described beside it, for a traffic observability tool.

  • Pro

    A wall of eight milestone badges for a language-learning app: unlocked ones solid, locked ones muted with a lock and a progress bar, a header count, and a tooltip with each unlock rule.