use fission::prelude::*;
// In view setup: these content/action values belong to the parent settings app.
let item = TabItem {
title: cx.tr("settings.security"),
content: security_panel_node,
on_press: Some(select_security_tab_action),
semantics_identifier: Some("settings.security".into()),
};
Field | Type | Meaning | Notes / default behavior |
|---|---|---|---|
title | String | Visible label for the tab button. | Required. |
content | Widget | Panel content for this tab. | Required. Only the active tab's content is shown. |
on_press | Option<ActionEnvelope> | Action fired when the tab is chosen. | Defaults to None. Usually sets the active index in state. |
semantics_identifier | Option<String> | Stable identifier for the generated tab semantic node. | Use it when titles may be duplicated or localized. |