zui docs v0.0.5
GitHub ↗
Foundation and layout Container Native Qt

Rectangle

Rectangle is a native Zui container in the foundation and layout catalog, with 8 component-specific properties.

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
rectangle width: 320, height: 180,
  color: "#18181d", radius: 20,
  border_color: "#b7ff5a", border_width: 1 do
  center { label "Native surface" }
end
API

Component properties

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

widthWidth configuration for Rectangle.property
heightHeight configuration for Rectangle.property
colorColor configuration for Rectangle.property
radiusRadius configuration for Rectangle.property
border_colorBorder color configuration for Rectangle.property
border_widthBorder width configuration for Rectangle.property
paddingPadding configuration for Rectangle.property
visibleVisible configuration for Rectangle.property
Show 14 shared item properties
enabledopacityscalerotationzfill_widthfill_heightpreferred_widthpreferred_heightminimum_widthminimum_heightmaximum_widthmaximum_heightlayout_alignment
Interaction

Events

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

clickNative event payload