Staaarter

Wellness Goals Tracker

Daily wellness goals tracker with progress bars showing current vs. target for water intake, steps, mindfulness, and meals, all driven by static props. Perfect for habit tracking and fitness apps.

By Staaarter Team
Health
Docs
Live preview

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.json

Prefer 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

PropTypeDefaultDescription
headingReactNodenoneSection heading.
descriptionstringundefinedSection intro text below the heading.
dayLabelstring"Today"Pill label at the top-right of the section.
goalsWellnessGoal[]noneOne progress card per goal.
classNamestringnoneExtra 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.