block
nutrition-overview
Composes energy, macro values; embeddable.
nutritionhealthdashboardoverviewmacronutrients

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


Install
With the sweetui tool (brew install mangobyte-dev/tap/sweetui):
sweetui install nutrition-overview --destination Sources/YourFeature/ComponentsInstalls in order: metric-card 0.2.2, macro-progress 0.4.1, nutrition-overview 0.2.3. Point --destination at a folder inside the consuming target's sources.
Usage
NutritionOverview(
"Today",
energyTitle: "Energy",
energy: Text("1,640 kcal"),
energyDetail: Text("360 kcal remaining"),
sectionTitle: "Macronutrients",
macros: [
NutritionMacroItem(
id: "protein",
name: "Protein",
value: Text("96 g"),
target: Text("130 g"),
progress: 96.0 / 130.0,
systemImage: "fish.fill",
tint: .indigo
)
],
actionTitle: "Log food",
onLogFood: {}
)Accessibility contract
- Button, ProgressView semantics; header-trait titles.
- System text, adaptive rows: Dynamic Type; prepared values: caller localization/format.
Details
| Kind | block |
| Version | 0.2.3 |
| Platforms | iOS 26.0+ |
| Dependencies | metric-card, macro-progress |
| Source | Registry/sources/blocks/NutritionOverview.swift |
| Xcode preview | Nutrition Overview |