<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/PrimitiveButtonStyle/automatic",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI20PrimitiveButtonStylePA2A07DefaultdE0VRszrlE9automaticAEvpZ"
  },
  "title" : "automatic"
}
-->

# automatic

The default button style, based on the button’s context.

```
@export(implementation) nonisolated static var automatic: DefaultButtonStyle { get }
```

## Discussion

If you create a button directly on a blank canvas, the style varies by
platform. iOS uses the borderless button style by default, whereas macOS,
tvOS, and watchOS use the bordered button style.

If you create a button inside a container, like a [`List`](/documentation/SwiftUI/List), the style
resolves to the recommended style for buttons inside that container for
that specific platform.

You can override a button’s style. To apply the default style to a
button, or to a view that contains buttons, use the
[`buttonStyle(_:)`](/documentation/SwiftUI/View/buttonStyle(_:)) modifier.

---

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)