<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UISearchBar/searchBarStyle",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UISearchBar(py)searchBarStyle"
  },
  "title" : "searchBarStyle"
}
-->

# searchBarStyle

A search bar style that specifies the search bar’s appearance.

```
var searchBarStyle: UISearchBar.Style { get set }
```

## Discussion

This property can be used together with [`barStyle`](/documentation/UIKit/UISearchBar/barStyle). The style [`UISearchBar.Style.minimal`](/documentation/UIKit/UISearchBar/Style/minimal) provides no default background color or image but will display one if customized as such.

Custom background and search field images take precedence over this property.

See [`UISearchBar.Style`](/documentation/UIKit/UISearchBar/Style) for possible values. The default value is [`UISearchBar.Style.default`](/documentation/UIKit/UISearchBar/Style/default).

---

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)