Skip to content

TabView

Presents mutually exclusive content in native tabs.

<TabView ... />

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
onChange function optional Callback invoked when the value changes.
selected table optional Selected option, tab, or row identifier.
style string optional Component-specific setting passed to the native control.
tabs table optional Tab definitions containing a title and content.
accessory table optional A TabAccessory record: SwiftUI tabViewBottomAccessory.

Example

<TabView />

Platform notes

  • AppKit retains the accessory for its refs without showing it (macOS has no tab-bar accessory). UIKit uses UITabBarController.bottomAccessory.

Source: lua/embedded/AppKit.lua:509 (AppKit.TabView)