Interactive previews iPhone

Remove Toolbar Item Margin

Configures whether the content margins are removed.

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

Platform Compatibility

iOS 27.0+ iPadOS 27.0+ macOS 27.0+ watchOS 27.0+ tvOS 27.0+ visionOS 27.0+

Tags

SwiftUI Code

Docs
NavigationStack {
    Text("FooBar")
        .toolbar {
            ToolbarItem {
                Text("Foo")
                    .frame(maxWidth: .infinity, maxHeight: .infinity)
                    .background(.blue.tertiary)
            }
            ToolbarSpacer()
            ToolbarItem {
                Text("Bar")
                    .frame(maxWidth: .infinity, maxHeight: .infinity)
                    .background(.blue.tertiary)
            }
            .contentMarginsRemoved(true)
        }
}

Found an issue or have a suggestion?

Created: August 30, 2026Updated: November 20, 2026

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.

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

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

ToolbarSpacer

A standard space item in toolbars

Explore Other Components

Browse all
Custom Icon Store View - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
initializer

Custom Icon Store View

Creates a view to load a collection of products from the App Store using product identifiers, and merchandise them using a custom image.

ButtonToggleStyle - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
style

ButtonToggleStyle

A toggle style that displays as a button with its label as the title.

List Row Background - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

List Row Background

Places a custom background view behind a list row item.

List Section Margins - iOS on iPhone - Portrait - Liquid Glass - Light Mode - Preview
modifier

List Section Margins

Set the section margins for the specific edges.

BorderedListStyle - macOS - Flat Design - Light Mode - Preview
style

BorderedListStyle

The list style that describes the behavior and appearance of a list with standard border.

Materials - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

Materials

All materials

UIKit Text Colors - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
type

UIKit Text Colors

The UIKit text colors that are also used in other components, such as the TextField

Move Disabled - iOS on iPhone - Portrait - Flat Design - Light Mode - Preview
modifier

Move Disabled

Adds a condition for whether the view’s view hierarchy is movable.