zui docs v0.0.5
GitHub ↗
Buttons and input Native Qt

Search Field

A live search input with suggestions, keyboard highlighting, clearing, and activation.

Usage

Ruby example

Paste this complete Builder example inside the app surface from the Quickstart. Replace illustrative asset paths with files from your project.

Ruby
search_field("", suggestions: %w[Button Card Chart], live: true) { |query| puts "Query: #{query}" }
API

Component properties

13 component-specific values, plus shared item and layout properties.

textText configuration for Search Field.property
suggestionsSuggestions configuration for Search Field.property
text_roleText role configuration for Search Field.property
liveLive configuration for Search Field.property
current_indexCurrent index configuration for Search Field.property
widthWidth configuration for Search Field.property
enabledEnabled configuration for Search Field.property
foregroundForeground configuration for Search Field.property
backgroundBackground configuration for Search Field.property
accentAccent configuration for Search Field.property
font_familyFont family configuration for Search Field.property
font_sizeFont size configuration for Search Field.property
visibleVisible configuration for Search Field.property
Show 14 shared item properties
opacityscalerotationzheightfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

Subscribe with on widget, :event and keep behavior in Ruby.

inputNative event payload
changeNative event payload
searchNative event payload
submitNative event payload
activateNative event payload
highlightNative event payload
clearNative event payload
focusNative event payload
blurNative event payload