SweetUI

Search items

Jump to an item

component

metric-card

Formatted, semantic metric text.

metricfinancehealthanalytics
metric-card, light

On iPad

The same installed source at a regular width. It adapts its layout without a separate design.

metric-card on iPad, light

Install

With the sweetui tool (brew install mangobyte-dev/tap/sweetui):

sweetui install metric-card --destination Sources/YourFeature/Components

Installs in order: metric-card 0.2.2. Point --destination at a folder inside the consuming target's sources.

Usage

MetricCard(
    "Available balance",
    value: Text(12_480.32, format: .currency(code: "USD")),
    detail: Text("Up 8.2% this month"),
    systemImage: "creditcard.fill"
)

Accessibility contract

  • Dynamic Type; title, value, detail combine.
  • Icon decorative; circle scales with text.

Details

Kindcomponent
Version0.2.2
PlatformsiOS 26.0+
Dependenciesnone
SourceRegistry/sources/components/MetricCard.swift
Xcode previewMetric Card