Skip to main content
196

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
Data displayApple

Calendar heatmap

Shows daily activity with explicit missing dates and a numeric intensity legend.

Public APILumenCalendarHeatmapApple / SwiftUISwift product: LumenUI

Apple availability

Supported native targets

Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.

iPhone · iOS 16+iPad · iPadOS 16+Mac · macOS 13+Apple TV · tvOS 16+Apple Vision · visionOS 1+Apple Watch · watchOS 9+

Native example

Use Calendar heatmap

Use Gregorian date-only identities and an inclusive range of at most 3660 days. Missing days stay distinct from zero.

Calendar heatmap rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulator
swift
LumenCalendarHeatmap(data: [.init(date: "2026-08-01", value: 3)], label: "Daily activity", startDate: "2026-08-01", endDate: "2026-08-28")

Reference

Public API

The primary shared and platform-specific options exposed by LumenCalendarHeatmap.

APIValues or typeDefaultDescription
dataLumenCalendarHeatmapDatum[]RequiredDate-only identity and nullable finite value.
startDate, endDateYYYY-MM-DDRequiredInclusive range. Duplicate, invalid or out-of-range dates fail closed.
weekStartsOn0 or 10Sunday or Monday. weekdayLabels is always Sunday-indexed.
formatDate, labelsLocalized formatters and labelsPlatform defaultsFormats dates and exact measurements consistently.
showDataBooleantrueProvides the visible expandable exact values.

Native behavior

Design and accessibility

When to use it

Use Gregorian date-only identities and an inclusive range of at most 3660 days. Missing days stay distinct from zero.

Accessibility

Retains exact date and value facts, including when the visible data list is hidden.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package