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

Text Field

A native single-line text input with placeholder, selection, focus, submit, and reactive input events.

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
text_field("", placeholder: "Project name") { |value| puts "Project: #{value}" }
API

Component properties

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

textText configuration for Text Field.property
placeholderPlaceholder configuration for Text Field.property
passwordPassword configuration for Text Field.property
foregroundForeground configuration for Text Field.property
accentAccent configuration for Text Field.property
selection_tintSelection tint configuration for Text Field.property
horizontal_paddingHorizontal padding configuration for Text Field.property
vertical_paddingVertical padding configuration for Text Field.property
cursorCursor configuration for Text Field.property
Show 17 shared item properties
visibleenabledopacityscalerotationzwidthheightfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

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

changeNative event payload
submitNative event payload
focusNative event payload
blurNative event payload
inputNative event payload