<!--
{
  "availability" : [
    "macOS: 14.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/PrimitiveButtonStyle/accessoryBar",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20PrimitiveButtonStylePA2A012AccessoryBardE0VRszrlE09accessoryG0AEvpZ"
  },
  "title" : "accessoryBar"
}
-->

# accessoryBar

A button style that is typically used in the context of an accessory
toolbar (sometimes refererred to as a “scope bar”), for buttons that
narrow the focus of a search or other operation.

```
@MainActor @preconcurrency static var accessoryBar: AccessoryBarButtonStyle { get }
```

## Discussion

This is the default button style for views in accessory toolbars,
created with `ToolbarItemPlacement.init(id:_)`, and for searchable
scopes.

This style will also affect button style `Toggle`s, as well as
button style `Picker`s and `Menu`s.

```
HStack(alignment: .firstTextBaseline) {
    Button("Button") {}

    Toggle("Toggle", isOn: $isToggleOn)
        .toggleStyle(.button)

    Picker("Picker", selection: $selection) {
        Text("Option 1").tag(0)
        Text("Option 2").tag(1)
    }

    Picker("Inline Picker", selection: $selection) {
        Text("Option 1").tag(0)
        Text("Option 2").tag(1)
    }
    .pickerStyle(.inline)

    Menu("Menu") {
        Button("Item") {}
    }
}
.buttonStyle(.accessoryBar)
```

---

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)