A home dashboard with a collapsing greeting, live metrics, a scrubbable chart and activity.
A dashboard home: a greeting that collapses into the nav bar, metric tiles with rolling values and sparklines, a scrubbable Swift Charts card with a range picker, activity rows with swipe actions and a designed pull-to-refresh.
$199 once, every piece included. See how installing works · Sign in
SwiftUI source you own, built on Apple frameworks only.
DashboardModelProductivity App (template)
How it behaves, what it handles, and the decisions behind it.
Everything is driven by a DashboardModel: mutate its properties and the screen animates. The greeting collapses into the navigation bar as you scroll, metric tiles roll to new values with numericText over sparklines that draw on first appear, and the main chart scrubs under the finger with a haptic per sample while the header shows the scrubbed value and date. The range picker slides its selection with matchedGeometryEffect and re-draws the chart. Activity rows swipe to reveal archive and delete; past 62% of the width, delete takes the whole reveal and a release commits it. Pulling down draws a ring that fills with the pull, spins while refresh runs and ends on a check with a success haptic. Sections stagger in on first appear.
NavigationStack, pass wrapsInNavigationStack: false so the screen uses the enclosing stack instead of its own. The Productivity App template embeds it this way.chartXSelection; the nearest sample is resolved on the model side, so irregular series work. .selection fires when the nearest sample changes, never per frame.onScrollPhaseChange); on iOS 17 it fires as the threshold is crossed.DashboardMetric.Format handles compact numbers, currency and percent.DashboardScreenExample at the end of DashboardScreen.swift is the screen shown in the preview; copy it as a starting point.SPTheme from @Environment(\.spTheme) and requires the design-system item. Set .environment(\.spTheme, YourTheme()) above the screen to re-skin it.bg for the ground, surface for cards and rows, accent for the chart, sparklines, refresh ring and row icons (override with tint), success and danger for change pills and delete, fill for the range track and ring, separator for grid lines and dividers, and the three text roles.type, space and radius: cards use radius.lg with spSurface(.e1), the greeting uses type.display, tick and pill labels use type.caption.motion.hero, the range picker uses motion.standard. Gesture release springs, the staggered reveal and value rolls keep their designed timings.Pieces that work well next to this one.