Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Wave Graph Point Selector Features Block for React

A smooth retention curve for a cohort tool: six weekly points on one line, a value that floats on hover and a cell under the chart that reads out the chosen 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 line-chart features section for React with Base UI. A smooth curve falls from week one to week six over a faint area, with hairline gridlines at every quarter, a percent axis at the start and a week axis along the foot. The six points are buttons in one group: hovering or focusing one floats its value above it, and choosing one draws a guide down to the axis and fills the cell beneath the chart, which shares a hairline with it, with that week's name, its change on the week before, a sentence about why, and the percentage rolling to its new value. The cells run from rail to rail. It's built from Sliding Number, Badge and Guides, with CSS transitions for the points and your theme's tokens for every colour. For retention, funnels, usage over time and any chart whose story is in a few moments on the line.

FAQ

How do I change the data?

Edit WEEKS at the top of the file: each has a name, a percentage and a sentence. The curve, its area and the point positions are all worked out from those values, so adding a point re-spaces the rest. The curve leaves each point level, so it never overshoots a value between two points.

How do I use the chart with a keyboard?

The points are one group of radio buttons: Tab puts focus on the chosen point and the arrow keys move along the curve, choosing a point as they go. The focused point floats its value and gets a focus ring, and each point's description points at its week's text under the chart.

What does a screen reader read?

Each point is a radio button named for its week, with that week's change and sentence as its description. The chart's caption gives the shape in a sentence (78 percent in week 1 to 43 percent in week 6), and the cell under the chart is real text, so the drawing is never the only source.

Does the cell under the chart change height?

No. The six weeks' texts sit in one grid cell and the five not chosen are invisible, so it is as tall as the longest and nothing below it moves when you choose a point.

How does the chart fit on a phone?

It gets shorter, the week labels shorten to W1 to W6, and each point keeps a 44 pixel touch target around its small mark. The cell under the chart stacks its text above the big number.

Does the chart mirror in right-to-left languages?

No: time runs the same way in every language, so the chart is dir="ltr". The header, the sentences and the cell under the chart follow the page's direction.

  • Pro

    A hairline plot for a prioritisation tool: six backlog ideas as dots on impact against effort, one radio group, with a panel beside it reading out the chosen idea's scores and verdict.

  • Pro

    A lifecycle drawn as a sine ribbon for a customer-success tool: six stages alternating above and below the wave, all readable at once, with a You are here chip under the stage an account is at.

  • Pro

    A six-wedge dial for a model router: choose a skill and the needle turns to its wedge, the hub rolls to its score, and a list beside the dial shows all six with the model each goes to.

  • 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 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.

  • 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.