suiss/uim · Block

Dash Analytics

An app analytics dashboard with a metric switcher, a weekly area chart, a regional breakdown and a tab bar.

Dash Analytics 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 Analytics on iOS in light mode

Composes Screen, Header, DropdownMenu for picking the app, ToggleGroup, the AreaChart from Chart, Item rows and TabBar. Switching the metric or app redraws the chart, and dragging across the chart updates the headline value for that week. The other tabs show a placeholder section.

Installation

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

The CLI also adds what it builds on: Button, Chart, Dropdown Menu, Header, Icon, Item, Screen, Tab Bar, Text, Toggle Group.

Manual

  1. Install the dependencies:
npx expo install phosphor-react-native react-native-svg
  1. Add the pieces it builds on: Button, Chart, Dropdown Menu, Header, Icon, Item, Screen, Tab Bar, Text, Toggle Group.

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

uniwind/components/blocks/dash-analytics.tsx
import {
  CaretDownIcon,
  ChartBarIcon,
  FlameIcon,
  NotePencilIcon,
  type Icon as PhosphorIcon,
  StarIcon,
  TagIcon,
} from "phosphor-react-native"
import * as React from "react"
import { ScrollView, View } from "react-native"
import { Button } from "@/components/ui/button"
import {
  Area,
  AreaChart,
  CartesianGrid,
  1. Update the import paths to match your project.

Usage

import { DashAnalytics } from "@/components/blocks/dash-analytics"
<DashAnalytics />

Replace apps, metrics and regions with your analytics data. Pass onAppChange, onMetricChange and onNavigate to sync the selections with your app.