Skip to main content

tab

Function tab 

Source
pub fn tab(title: &str, system_image: &str, content: &ViewHandle) -> ViewHandle
Expand description

Tab("Home", systemImage: "house") { … } — one tab of a modern TabView.

The older way to build a tab is .tabItem { Label(…) } on the page itself, which is what tab_item binds. Tab is the replacement: the tab and its label are one value rather than a modifier on the content, which is what lets a TabView know its tabs without rendering them.

Tab is not a View — it is a TabContent, and only a TabView accepts one.