Staaarter

Fitness Overview

A health dashboard with a horizontal top nav instead of a sidebar: three activity rings (Move, Exercise, Stand), a steps area chart and a heart-rate line chart side by side, and a recent-workouts list. A Today/Week/Month segmented control genuinely swaps every ring value and both chart series to a different fixed dataset.

By Staaarter Team
Dashboard
Docs
Live preview

Docs

Installation

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

npx shadcn add https://staaarter.com/r/fitness-overview.json

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

Usage

The file also exports dashboard11Demo, 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 { Dashboard11, dashboard11Demo } from "@/components/blocks/dashboard/dashboard11";

export default function Page() {
  return <Dashboard11 {...dashboard11Demo} />;
}

Props

PropTypeDefaultDescription
userNamestring"Sam Rivera"Name shown in the greeting header and the avatar's initials.
navLinksNavLink[]noneTop nav bar entries; hidden below the md breakpoint.
periods{ today: PeriodData; week: PeriodData; month: PeriodData }noneOne full dataset per segmented-control option. Switching tabs swaps the totals, the ring values, and the chart arrays to the matching entry.
workoutsWorkout[]noneRecent-workouts list rows. Does not change with the selected period; icons are assigned by position, not passed in as data.
classNamestringnoneExtra classes for the outer section element.

Types

type NavLink = { label: string; href: string; active?: boolean };

type RingValues = { move: number; exercise: number; stand: number };

type PeriodData = {
  totalSteps: string;
  avgHeartRate: string;
  steps: number[];
  heartRate: number[];
  rings: RingValues;
};

type Workout = { type: string; duration: string; calories: string; date: string };

Behavior notes

  • The Today/Week/Month control is real client state: it swaps `periods.today`/`periods.week`/`periods.month` wholesale, so the ring values, the totals in the two chart card headers, and both chart's underlying number arrays all change together.
  • The three activity rings reuse the same RadialGauge helper with different literal color classes (emerald/sky/violet); the colors are a status-accent exception to the semantic-token rule, not a themeable prop.
  • Ring values are read as literal percentages and rendered directly as text (e.g. `82%`); values above 100 would still draw a full ring but the percentage label is not clamped.
  • The recent-workouts list is static and does not depend on the selected period, only the rings and the two charts respond to the period switch.
  • Workout icons are a fixed array indexed by row position in the code, not a prop, since function/component values can't cross into a "use client" module as props.