Skip to main content
239

Search Lumen

Find components, APIs, guides, and recipes.

GitHub
Themes
Apple docs
ActionsApple

Toolbar

Group compact buttons and toggles in one framed row or column.

Public APILumenToolbarApple / 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 Vision · visionOS 1+

Native example

Use Toolbar

Split related controls with separators. Keep labels short, and use icon buttons with names for dense editors.

Toolbar rendered in the iPhone simulator Lumen playground
Captured exampleiPhone simulatorView dark appearance
swift
import LumenUI
import SwiftUI

struct FormattingToolbar: View {
    @State private var italic = true
    @State private var strikethrough = false
    @State private var code = false

    var body: some View {
        LumenToolbar("Text formatting") {
            LumenButtonGroup {
                LumenToggleButton("Italic", isPressed: $italic, icon: .italic, iconOnly: true)
                LumenToggleButton("Strikethrough", isPressed: $strikethrough, icon: .strikethrough, iconOnly: true)
                LumenToggleButton("Inline code", isPressed: $code, icon: .code, iconOnly: true)
            }
            LumenDivider()
            LumenIconButton(name: .link, label: "Insert link") {}
            LumenDivider()
            LumenButton(intent: .quiet, action: {}) {
                HStack(spacing: 6) {
                    LumenIcon(name: .messageSquarePlus, size: .sm)
                    Text("Comment")
                }
            }
        }
    }
}
Apple
A text formatting toolbar with grouped style toggles, a hairline separator, a link button and a labelled Comment action.

Reference

Public API

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

APIValues or typeDefaultDescription
label / orientation / contentaccessible name / row or column / controlsToolbar / horizontal / requiredSplit related controls with separators.

Native behavior

Design and accessibility

When to use it

Split related controls with separators. Keep labels short, and use icon buttons with names for dense editors.

Accessibility

A named toolbar; each control keeps its own name and pressed state.

Shared component

Available on other platforms

React NativeAndroid / Compose Web
Apple docsSwiftUI package