Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/wellness-goals-tracker.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/health/health9.tsx instead.
Usage
The file also exports health9Demo, 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 { Health9, health9Demo } from "@/components/blocks/health/health9"; export default function Page() { return <Health9 {...health9Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | ReactNode | none | Section heading. |
| description | string | undefined | Section intro text below the heading. |
| dayLabel | string | "Today" | Pill label at the top-right of the section. |
| goals | WellnessGoal[] | none | One progress card per goal. |
| className | string | none | Extra classes for the outer section element. |
Types
type WellnessGoal = { label: string; current: number; target: number; unit: string; percentage: number; };
Behavior notes
- percentage is a separate static prop that drives each progress bar's width directly; it is not computed from current/target at render time, so callers are responsible for keeping it consistent with those two numbers.
- percentage is clamped to a 0-100 range before it's used as the bar's width, so an out-of-range prop can't overflow the bar.
- Each goal's icon is picked from a fixed four-icon set (water, steps, mindfulness, meals) by array position, not passed in as prop data.
- dayLabel defaults to "Today" and is a static display string only; it is not derived from Date.now() or any real clock.
More Health Blocks
View all →Care Programme Cards
Three hairline programme cards pairing a light programme name with a muted duration line, a short explanation, and a checked feature list.
Care Overview Dashboard
Clinical overview with an eyebrow over a hairline rule, a two-column heading, and a bordered dashboard panel with a stat, a retention ring, a status strip, and an outcomes row.
Daily Health Check-in
Two-column layout with feature highlights and a daily summary card showing heart rate, activity, and recovery metrics.
Health Statistics Display
Large-format statistics grid showcasing key metrics like member counts, satisfaction rates, and years of service.
Wellness Editorial Section
Long-form content section with rich text, bullet point highlights, and call-to-action buttons.
Medical Services Grid
Service cards displaying medical specialties with appointment durations, feature lists, and booking CTAs.