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

Toggle

A descriptive boolean setting row with label, supporting copy, and change 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
toggle("Notifications", checked: true, description: "Show native alerts") { |checked| puts "Notifications: #{checked}" }
API

Component properties

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

labelLabel configuration for Toggle.property
descriptionDescription configuration for Toggle.property
checkedChecked configuration for Toggle.property
cursorCursor configuration for Toggle.property
roundedRounded configuration for Toggle.property
foregroundForeground configuration for Toggle.property
accentAccent configuration for Toggle.property
font_familyFont family configuration for Toggle.property
title_sizeTitle size configuration for Toggle.property
description_sizeDescription size configuration for Toggle.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
hoverNative event payload