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/daily-health-check-in.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/health/health3.tsx instead.
Usage
The file also exports health3Demo, 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 { Health3, health3Demo } from "@/components/blocks/health/health3"; export default function Page() { return <Health3 {...health3Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| eyebrow | string | none | Small uppercase label above the heading; only rendered when set. |
| heading | ReactNode | none | Left-column heading. |
| description | string | undefined | Left-column intro text below the heading. |
| highlights | Highlight[] | none | Icon feature list under the heading. |
| summaryTitle | string | "Today's summary" | Title at the top of the summary card. |
| summaryDate | string | undefined | Badge next to the summary title; only rendered when set. |
| heartRate | number | none | Resting heart rate in bpm, shown as a static number. |
| heartRateLabel | string | "Resting heart rate" | Label above the heart rate value. |
| steps | number | none | Step count for the day, shown as a static number with comma formatting. |
| stepsGoal | number | none | Step goal; drives the activity bar's fill as steps / stepsGoal, clamped to 100%. |
| activityLabel | string | "Steps" | Label above the step count. |
| recoveryScore | number | none | 0-100 recovery score driving the static SVG ring's fill. |
| recoveryLabel | string | "Recovery score" | Label next to the recovery ring. |
| className | string | none | Extra classes for the outer section element. |
Types
type Highlight = { icon: LucideIcon; title: string; description: string; };
Behavior notes
- heartRate, steps, stepsGoal, and recoveryScore are all static number props read once at render time; nothing here polls a device or updates after mount.
- steps and stepsGoal are formatted with a locale-independent comma inserter (a fixed regex, not Intl/toLocaleString) so the digit grouping can't differ between server and client rendering.
- The activity bar's width and the recovery ring's strokeDashoffset are both clamped to a 0-100% range, so an out-of-range prop can't overflow the bar or overshoot the ring.
- Each highlight's icon is a hardcoded LucideIcon component reference passed as a prop; this block is a plain server component, so passing a component reference as a prop is safe here (would not be if this were a "use client" block).
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.
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.
Wellness Hero Section
Split-layout hero with large typography, serene imagery, and a floating testimonial card.