Nasaq
Components

Daily Summary

One day at a glance with water, meals by safety, caffeine by kind, focus sessions, shutdown violations, steps, sleep, energy, heart rate and weight, plus a day switcher.

PreviewOpen ↗

Code

import { DailySummary } from "@fadymondy/nasaq/web";export function Today({ summary, load }: { summary: DailySummaryData; load: (date: string) => void }) {  return <DailySummary summary={summary} waterGoalMl={3000} maxDate="2026-09-29" onDateChange={load} />;}

Wellness · beta

Live examples and controls: Daily Summary in the lab.

Install

npx shadcn@latest add https://docs.nasaqui.com/r/daily-summary.json

The rollup for one civil day. Protocol figures (water, meals, caffeine, shutdown violations, focus sessions) come first, then body and activity (steps, sleep, energy, resting heart rate, weight). A figure the device did not send reads "Not synced"; it is never shown as zero. Meals and caffeine are split by kind with an icon and a word for each kind, so colour is never the only signal.

When to use

  • The "today" or "yesterday" screen of a health app.
  • Anywhere a person steps through days one at a time.

When not to use

Import

import { DailySummary } from "@fadymondy/nasaq/web";
// inside this monorepo: "@nasaq/web"

Quick start

import { DailySummary } from "@fadymondy/nasaq/web";

export function Today({ summary, load }: { summary: DailySummaryData; load: (date: string) => void }) {
  return <DailySummary summary={summary} waterGoalMl={3000} maxDate="2026-09-29" onDateChange={load} />;
}

Anatomy

DailySummary                  data-slot="daily-summary"  data-date
├─ header                     previous, date heading, next, source Badge
├─ Protocol                   water (Meter against your goal), meals, caffeine, shutdown, focus sessions
└─ Body and activity          StatCards

API

PropTypeNotes
summaryDailySummaryDataOne row per day. Every figure is optional.
datestringThe day shown while summary is absent.
maxDatestringThe next button stops here.
onDateChange(date: string) => voidCalled with the neighbouring civil date. Omit to hide the switcher.
waterGoalMlnumberThe person's own goal. Nothing is drawn without one.
loading, error, onRetrySkeleton, the server's message, retry.
labelsPartial<DailySummaryLabels>Override any string.

addCivilDays, isCivilDate, isAfter, minutesToSeconds and unclassifiedCount are exported from the folder for hosts.

On this page