Interactive previews iPhone

ToolbarSpacer

A standard space item in toolbars

ToolbarSpacer - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview

Platform Compatibility

iOS 26.0+ iPadOS 26.0+ macOS 26.0+

Tags

SwiftUI Code

Docs
content
  .toolbar {
  ToolbarItemGroup(placement: .primaryAction) {
    Button("Up", systemImage: "chevron.up", action: action)
    Button("Down", systemImage: "chevron.down", action: action)
  }
  ToolbarSpacer(.fixed, placement: .primaryAction)
  ToolbarItem(placement: .primaryAction) {
    Button("Settings", systemImage: "ellipsis", action: action)
  }
}

Found an issue or have a suggestion?

Created: June 10, 2025Updated: December 27, 2025
Connect Wizard

Connect Wizard

Unlock insights App Store Connect doesn’t show you.

Get Started

More Toolbars Components

View all
Prefer Vertical Toolbar Items - iOS on iPhone Duo - Landscape - Closed - Liquid Glass - Light Mode - Preview
modifier

Prefer Vertical Toolbar Items

A compression behavior that prioritizes keeping toolbar items visible over other elements, such as tabs. By default, tabs are prioritized.

Axis Behavior - iOS on iPhone Duo - Landscape - Closed - Liquid Glass - Light Mode - Preview
modifier

Axis Behavior

The bar axis behavior of the toolbar item.

Toolbar Item Visibility Priority - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Toolbar Item Visibility Priority

Defines the visibility priority for a toolbar item.

Toolbar Overflow Menu - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Toolbar Overflow Menu

The overflow menu of a toolbar. An overflow menu represents actions that are always placed in the toolbar’s overflow menu, regardless of the toolbar mode, platform, or customizability.

Pinned Toolbar Item Placement - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Pinned Toolbar Item Placement

A placement that pins the item to the trailing edge of the toolbar.

Remove Toolbar Item Margin - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Remove Toolbar Item Margin

Configures whether the content margins are removed.

Title Toolbar Item Placement - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializers

Title Toolbar Item Placement

Places content in the title area

ToolbarItem Shared Background Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

ToolbarItem Shared Background Visibility

Controls the visibility of the glass background effect on items in the toolbar. In certain contexts, such as the navigation bar on iOS and the window toolbar on macOS, toolbar items will be given a glass background effect that is shared with other items in the same logical grouping

Explore Other Components

Browse all
Compact List Section Spacing - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Compact List Section Spacing

Compact spacing between sections

Sheet Drag Indicator Visibility - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Sheet Drag Indicator Visibility

Sets the visibility of the drag indicator on top of a sheet.

Default Min List Row Height - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Default Min List Row Height

The default minimum height of rows in a list.

Color Gradient - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Color Gradient

The Color gradient modifier

Menu Action Button - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Menu Action Button

Acts like a button and opens the menu on a secondary gesture

Edit Button - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
initializer

Edit Button

A button that toggles the edit mode environment value.

Default Min List Header Height - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Default Min List Header Height

The default minimum height of a header in a list.

Prioritize Sheet Content Scrolling - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

Prioritize Sheet Content Scrolling

Configures the behavior of swipe gestures on a presentation. PresentationContentInteraction.scrolls prioritizes scrolling the content over resizing the sheet.