GtkSearchBar

A toolbar for search functionality.

Preview

CSS Node Tree

searchbar
  └── revealer
      └── box
          ├── [child]
          └── [button.image-button.close]

Props

Prop

Type

Behavior

  • Slides in when searchModeEnabled turns true and focuses its GtkSearchEntry; hiding it clears the entry.
  • Escape in the entry and the close button hide it (onSearchModeChanged(false)). Without searchModeEnabled the bar keeps its own state.
  • With keyCaptureRef, typing a printable key elsewhere in that element reveals the bar and types the key into the entry.

GTK4 Documentation →

On this page