<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/CustomizableToolbarContent/defaultCustomization(_:options:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI26CustomizableToolbarContentPAAE20defaultCustomization_7optionsQrAA10VisibilityO_AA0dG7OptionsVtF"
  },
  "title" : "defaultCustomization(_:options:)"
}
-->

# defaultCustomization(_:options:)

Configures the way customizable toolbar items with the default
behavior behave.

```
func defaultCustomization(_ defaultVisibility: Visibility = .automatic, options: ToolbarCustomizationOptions = []) -> some CustomizableToolbarContent
```

## Parameters

`defaultVisibility`

The default visibility of toolbar content
with the default customization behavior.

`options`

The customization options to configure the behavior
of toolbar content with the default customization behavior.

## Discussion

Default customizable items support a variety of edits by the user.

- A user can add an item that is not in the toolbar.
- A user can remove an item that is in the toolbar.
- A user can move an item within the toolbar.

By default, all default customizable items will be initially
present in the toolbar. Provide a value of
[`Visibility.hidden`](/documentation/SwiftUI/Visibility/hidden) to this modifier to specify that items should
initially be hidden from the user, and require them to add those items
to the toolbar if desired.

```
ContentView()
    .toolbar(id: "main") {
        ToolbarItem(id: "new") {
            // new button here
        }
        .defaultCustomization(.hidden)
    }
```

You can ensure that the user can always use an item with default
customizability, even if it’s removed from the customizable toolbar. To
do this, provide the [`alwaysAvailable`](/documentation/SwiftUI/ToolbarCustomizationOptions/alwaysAvailable)
option. These items will remain in the overflow if the user removes them
from the toolbar.

Provide a value of [`alwaysAvailable`](/documentation/SwiftUI/ToolbarCustomizationOptions/alwaysAvailable) to
the options parameter of this modifier to receive this behavior.

```
ContentView()
    .toolbar(id: "main") {
        ToolbarItem(id: "new") {
            // new button here
        }
        .defaultCustomization(options: .alwaysAvailable)
    }
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)