Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Radial Dial Stats Integration Block for React

An integration stats section for a community announcements tool running in Discord: a framed 24-hour dial of posts an hour with the quiet hours drawn as hatched ticks, and three figures worked out from the same data.

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

An integration stats section for React with Base UI, written for Hearthbell, a fictional tool that posts community announcements and syncs roles, and its Discord bot. A start-aligned header names both ("When Hearthbell posts in Discord") with one sentence. Under it, a framed figure with + marks on its corners holds a 24-hour dial: one bar per hour of the UTC day around a ring, midnight at the top and clockwise, each bar as long as the announcements posted that hour, the busiest hour in full foreground and named at the centre, and the quiet hours Hearthbell holds posts through drawn as short hatched ticks instead of bars. A legend names the two marks. Behind a split divider that runs from the top rule to the block's foot, the mark pair (Hearthbell's own tile and Discord's neutral lettermark tile, joined by a connector) sits above three figures: posts a day, the peak hour and the quiet hours. The block ends on content. On a phone the dial stacks over the figures. The page's rails and top rule come from the Guides spine, so it lines up with its neighbours in a stack. It's built from Guides, with an inline SVG, CSS transitions for the entrance and your theme's tokens for every colour: no hue, so it reads in any preset. Discord is named in text only: no Discord logo, colour or wordmark ships with the block. The product and all figures are example data.

FAQ

Where do the numbers come from?

From two typed constants at the top of the file: POSTS, the 24 hourly counts, and QUIET, the range of hours posts are held. The dial's bars, the busiest hour, the total a day and the count of quiet hours are all worked out from them, so changing a value moves every figure with it. The figures are example data; nothing is read from Discord.

Why are the quiet hours ticks instead of bars?

A quiet hour posts nothing by design: Hearthbell holds the announcement and sends it when the window ends. A zero-length bar would vanish, so the hour is drawn as a short hatched tick, which also tells it apart from a busy hour that happened to post nothing. The legend and the hidden table both say "Quiet hour, held" for those hours.

How does a screen reader get the dial?

The drawing is hidden from assistive technology, and a visually hidden table inside the figure lists every hour with its count, under a caption that names the chart. The three figures are a description list with the same numbers as text, and the busiest hour is also in the centre of the dial.

Can I show Discord's logo?

The block names Discord in text and ships no logo, colour or wordmark. Discord's tile is a neutral lettermark, Di in a muted square, in an icon slot that a code comment marks: drop in the official mark only if you have the rights to use it, under the owner's brand guidelines, and never redraw it. The pair is hidden from assistive technology because the heading already names both products.

Does it work right to left, on a phone and with reduced motion?

The dial keeps its own left-to-right orientation in any layout, because time runs clockwise from midnight whatever the page's direction; the labels and figures around it follow the page. The dial scales down to a square that fits 320 pixels and sits above the figures below lg. The header and the figures fade up once on load with CSS transitions; with reduced motion they simply appear. The block has no state.

  • Pro

    An integration detail section for a community announcements tool joining a Discord server: an invite card whose permissions integer and link follow eight permission switches, each with its documented bit value.

  • Pro

    A linked-members list for a community tool connected to Discord: a search that marks the letters you type, fourteen members six to a page with their level roles and link state, a Retry on the one link that failed, and a pager.

  • Pro

    A grid of six Discord level roles for a community tool: each cell a role chip, a switch and a number stepper for the messages that earn it, with a derived time line and an error when the thresholds stop rising.

  • Pro

    Discord Setup Integration

    Choose and verify

    A connect flow for a community tool and Discord: a three-step wizard (authorize, pick a server, map three plans to roles with Selects) beside the server's role ladder with the bot's own role marked, ending in Finish setup.

  • Pro

    A seven-day by 24-hour matrix of tiny squares in five foreground steps, with 00, 06, 12 and 18 hour markers, an outlined busiest hour and a readout in the frame's foot.

  • Pro

    A gateway usage table where each route shows calls, error rate, a p50-to-p99 latency range on one scale, and a bar for its share of the rate limit.