When to use it
Split related controls with separators. Keep labels short, and use icon buttons with names for dense editors.
Group compact buttons and toggles in one framed row or column.
Apple availability
Import LumenUI in the target that uses this component. iPad support follows the iOS package baseline and uses native iPad layout behavior.
Native example
Split related controls with separators. Keep labels short, and use icon buttons with names for dense editors.
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")
}
}
}
}
}Reference
The primary shared and platform-specific options exposed by LumenToolbar.
| API | Values or type | Default | Description |
|---|---|---|---|
| label / orientation / content | accessible name / row or column / controls | Toolbar / horizontal / required | Split related controls with separators. |
Native behavior
Split related controls with separators. Keep labels short, and use icon buttons with names for dense editors.
A named toolbar; each control keeps its own name and pressed state.
Shared component