suiss/uim · Block

Dash Health

A health summary with pinned metric cards, sparklines and drill-down sections for activity, heart, sleep and mobility.

Dash Health is an open-source mobile screen from suiss/uim for React Native and Expo, with SwiftUI and Jetpack Compose versions built from the same design tokens. The @esuiss/uim CLI copies its source into your project, so you own the code.

iOS
Dash Health on iOS in light mode

Composes Screen, Header with a back button, Avatar, Button, Icon and Item groups, with sparklines drawn using react-native-svg. The list opens a section of metric cards, and the Summary section has an Edit mode for pinning and unpinning cards.

Installation

$ pnpm dlx @esuiss/uim@latest add dash-health

The CLI also adds what it builds on: Avatar, Button, Header, Icon, Item, Screen, Text.

Manual

  1. Install the dependencies:
npx expo install cn phosphor-react-native react-native-reanimated react-native-svg react-native-worklets
  1. Add the pieces it builds on: Avatar, Button, Header, Icon, Item, Screen, Text.

  2. Copy the source into components/blocks/dash-health.tsx:

uniwind/components/blocks/dash-health.tsx
import { cn } from "cn"
import {
  CaretRightIcon,
  ChartBarIcon,
  FlameIcon,
  HeartIcon,
  MinusIcon,
  MoonIcon,
  type Icon as PhosphorIcon,
  type IconProps as PhosphorIconProps,
  PlusIcon,
  UsersIcon,
} from "phosphor-react-native"
import * as React from "react"
import { I18nManager, Pressable, View } from "react-native"
import { FadeInDown, ReduceMotion } from "react-native-reanimated"
  1. Update the import paths to match your project.

Usage

import { DashHealth } from "@/components/blocks/dash-health"
<DashHealth />

Replace METRICS and CATEGORIES with your own readings. Pass onMetricPress to open a metric and onPinnedChange to store the pinned list.