Controlling NSSearchField appearance in sidebars and inspectors on macOS 27

First of all, thank you for updating the sidebar visuals in macOS 27!

However, in macOS 27, an NSSearchField subclass placed in a sidebar or inspector appears with the same Liquid Glass button-like styling as toolbar items and other buttons. This behavior seems specific to NSSearchField; for example, a plain NSTextField does not exhibit the same appearance.

While this styling may be appropriate in a toolbar, it feels out of place for a search field embedded in a sidebar or inspector. This appearance makes the search field visually indistinguishable from adjacent buttons and reduces its affordance as a text input control.

Is there a supported way to control or override the appearance of an NSSearchField placed in a sidebar or inspector in macOS 27, so that it uses a more traditional search field style instead of the Liquid Glass button-like appearance?

As a point of reference, Xcode 27 Beta 1 on macOS 27 Beta 1 does not appear to apply the Liquid Glass–style appearance to search fields in its sidebar. This may be because those fields are not implemented as direct subclasses of NSSearchField; however, I believe it also suggests that the Liquid Glass style is not well suited to search fields in this context.

Answered by Frameworks Engineer in 892267022

It's great to hear that you're liking the new sidebar appearance with macOS Golden Gate!

The glass appearance of search field in the sidebar is the expected appearance in macOS 27 and can be seen in system apps such as System Settings.

Thanks for the question on this - this is very helpful for us to consider. Please also send feedback in Feedback Assistant with information about your use case and the expected behavior for this search field.

Accepted Answer

It's great to hear that you're liking the new sidebar appearance with macOS Golden Gate!

The glass appearance of search field in the sidebar is the expected appearance in macOS 27 and can be seen in system apps such as System Settings.

Thanks for the question on this - this is very helpful for us to consider. Please also send feedback in Feedback Assistant with information about your use case and the expected behavior for this search field.

Thank you for the reply.

I understand that there is currently no way to change this behavior. Even knowing that is helpful.

I have also seen this appearance in the App Store on macOS 27. In that context, the Liquid Glass style did not feel out of place to me. I think it would be beneficial if applications could choose the appropriate appearance depending on the use case.

My first thought was that adding a new case to bezelStyle (NSTextField.BezelStyle) would be a straightforward solution, although a separate flag or another API might also be appropriate.

In any case, I will submit feedback requesting this capability. Thanks!

To add on to what my colleague said in case it's helpful. Try placing the NSSearchField inside the sidebar's scrolling content (so it has an enclosing NSScrollView and scrolls with the list) rather than pinning it above the content since a search field that scrolls with its content opts out of the glass styling. You may also find that a search field which customizes its own drawing behaves a little differently here, which is part of why some apps' sidebar search fields don't pick up the glass appearance though that's not something to rely on long-term. For a lasting, supported solution the Feedback is still the best path.

Thank you for the additional information!

I suspected that the first suggestion—placing the search field inside the scroll view—would not be a good fit for my particular use case. However, the follow-up note that “a search field which customizes its own drawing behaves a little differently here” is extremely helpful.

In fact, I discovered that simply overriding draw(_:) in an NSSearchField subclass, even without changing the drawing behavior at all, is enough to suppress the Liquid Glass appearance.

override func draw(_ dirtyRect: NSRect) {
    super.draw(dirtyRect)
}

As you mentioned, this is only a workaround, so I still plan to file a formal enhancement request. Nevertheless, tips like this are incredibly useful and much appreciated.

Controlling NSSearchField appearance in sidebars and inspectors on macOS 27
 
 
Q