Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Radar Criteria Spider Reviews Block for React

A hand-built radar of six criteria with a toggle that lays one reviewer group, commuters or racers, over everyone, a description list of the scores and an unseen table for screen readers.

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 criteria spider for React with Base UI, for the Rafterford, a fictional road bike. A split behind a divider: at the end, a header, a three-way toggle (Commuters, Racers, Everyone) and a description list of the six criteria with the chosen group's score, everyone's and the signed gap; at the start, a framed square radar with six axes, grid rings at every point from 1 to 5, the chosen group as a solid filled outline and all eighteen reviewers as a dashed one. Choosing Everyone draws only the solid outline. The criteria and scores are HTML round the chart, an unseen table carries the same numbers for a screen reader, and every score is worked out from the eighteen typed reviews at the top of the file. On a phone the order is the header, the toggle, the chart, then the list. It's built from Toggle Group, Guides and hand-drawn SVG.

FAQ

Where do the numbers come from?

From the REVIEWS array: each review has a reviewer group and six scores from 1 to 5 in the order of CRITERIA. A group's score for a criterion is the average of its reviews, to one decimal; Everyone averages all eighteen, including the four weekend riders who are not in the toggle. The outlines, the labels, the list and the table are all computed from those scores, so they always agree.

How is the radar drawn?

Six axes from the middle of a 100 by 100 box, each ring a polygon at one point of the score, the outlines polygons whose vertex on an axis sits at its score over five. The strokes keep a constant width however the chart scales, and the polygons grow from the middle once on load unless reduced motion is on. The names and scores are HTML placed by CSS variables, so the text stays crisp.

How does the toggle work?

It is a single-choice group of buttons: Tab reaches it, the arrow keys move between groups and Space or Enter picks one. One group is always chosen. Its choice redraws the solid outline and rewrites the labels and the list. The group takes a value list and a change handler that receives the new list.

How does a screen reader get the chart?

The drawing is hidden from assistive technology; the description list beside it says the chosen group's score for each criterion against everyone's with the gap, and an unseen table lists all three groups' scores for every criterion. Nothing is shown by colour: the groups differ by a solid and a dashed outline.

How does it fit on a phone?

The header and the toggle come first, then the chart in its frame at the width of the screen, then the list. The criteria names stay round the chart at 320 pixels, and nothing scrolls sideways.

  • Pro

    Five criteria as ruled rows with a bar, a score and a signed change against the previous quarter, and a Select that weighs them for everyday, commuting or gym use and re-derives the overall score.

  • Pro

    Reviews that each score five criteria, with a picker that sorts the list by one criterion and shows every criterion's average, and the five scores of each review drawn as dots.

  • Pro

    Four areas of an e-bike as accordion rows from rail to rail, each with a bar, a score and a signed change against the previous quarter, opening into three scored parts, under a sentence that names the strongest and the weakest.

  • Pro

    A running watch scored against its own previous generation in a sortable table: Gen 1 and Gen 2 scores each over a thin bar, the signed change with an arrow, and header buttons that sort by criterion or by biggest change.

  • Pro

    Two blenders chosen with two Selects and set side by side: scores, review counts, five criterion rows with the higher score marked by bold, a check and the word Higher, and one pro, one con and one quote each.

  • Pro

    A review summary for a carry-on suitcase whose star rows filter the reviews: the average, the count, the share that would recommend it and a five-row distribution, beside the four most helpful reviews with a Helpful vote each.