Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
LayoutApple

Section header

Identify a native section with optional supporting copy, count, and trailing actions.

Public APILumenSectionHeaderApple / 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 Section header

Use above a native section or collection. Keep actions compact and directly related to the section.

Section header rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenSectionHeader(
    "Workspaces",
    subtitle: "Recently used",
    count: "4"
) {
    LumenButton("Add", intent: .quiet, size: .sm, action: addWorkspace)
}

Reference

Public API

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

APIValues or typeDefaultDescription
titleLocalizedStringKeyRequiredNames the section.
subtitleLocalizedStringKey?nilAdds supporting context.
countString?nilShows an optional count badge.
actions@ViewBuilder () -> ActionsEmptyViewProvides trailing section actions.

Native behavior

Design and accessibility

When to use it

Use above a native section or collection. Keep actions compact and directly related to the section.

Accessibility

The section identity, optional count, and actions remain a contained group while actions preserve their own labels.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package