Skip to content

Latest commit

 

History

History
38 lines (24 loc) · 985 Bytes

Toggle.md

File metadata and controls

38 lines (24 loc) · 985 Bytes

Toggle

Represents an on/off value with a native switch or checkbox.

<Toggle ... />

Overview

This component is backed by the platform control or container. Prefer its XML tag in an .etlua template; keep view-tree construction out of controllers.

Topics

Properties

Name Type Required Description
action function optional Component-specific setting passed to the native control.
disabled boolean optional Component-specific setting passed to the native control.
is_on value optional Current on/off value (legacy spelling).
label value optional Component-specific setting passed to the native control.

Example

<Toggle />

Platform notes

  • AppKit uses the AppKit implementation. UIKit uses the UIKit implementation.

Source: lua/embedded/AppKit.lua:1305 (AppKit.Toggle)