Staaarter

Stats With Map Visual

Split section pairing a short list of stats with a decorative, abstract dot-cluster graphic (built from plain positioned dots, not a map illustration or geographic data) to evoke a sense of global scale or distributed reach.

By Staaarter Team
Stats
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/stats-with-map-visual.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/stats/stats8.tsx instead.

Usage

The file also exports stats8Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Stats8, stats8Demo } from "@/components/blocks/stats/stats8";

export default function Page() {
  return <Stats8 {...stats8Demo} />;
}

Props

PropTypeDefaultDescription
badge{ label: string; variant?: BadgeVariant }nonePill above the heading; only rendered when badge is truthy.
headingstringundefinedSection heading.
descriptionstringundefinedSection intro text.
statsStatItem[]noneStat tiles rendered in a 2-column grid next to the graphic.
classNamestringnoneExtra classes for the outer section element.

Types

type StatItem = { value: string; label: string };

Behavior notes

  • The dot-cluster graphic is a decorative, abstract visual only, it is not a map and carries no geographic data or accuracy claims.
  • Dot positions come from a fixed set of concentric rings computed with plain arithmetic at module scope; the same 48 dots render every time, so there is no randomness and no hydration mismatch.
  • The graphic is purely presentational (aria-hidden) and has no relationship to the stat values shown beside it.