Skip to main content
161

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Apple docs
ActionsApple

Button

Run native actions with shared intent, size, loading, and disabled contracts.

Public APILumenButtonApple / 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 Button

Use primary sparingly for the main action, secondary for alternatives, quiet for low-emphasis actions, and danger for destructive operations.

Button rendered in the iPhone simulator Lumen playground
Verified runtime captureiPhone simulator
swift
LumenButton(
    "Continue",
    intent: .primary,
    action: continueFlow
)

Reference

Public API

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

APIValues or typeDefaultDescription
actionCallbackRequiredRuns the button action.
intentprimary · secondary · quiet · dangerprimarySelects semantic emphasis.
sizesm · md · lgmdSelects shared control height and padding.
loadingBooleanfalseShows native progress and prevents activation.
SwiftUI .disabledBooleanfalseControls native disabled state.
labelNative contentRequiredProvides the visible button label.

Native behavior

Design and accessibility

When to use it

Use primary sparingly for the main action, secondary for alternatives, quiet for low-emphasis actions, and danger for destructive operations.

Accessibility

Disabled and loading buttons expose native state and cannot trigger their action. The visible label supplies the accessible name.

Shared component

Available on other platforms

React NativeAndroid / Compose
Apple docsSwiftUI package