init(value:role:content:label:)
Creates a new tab with a label that you can use in a tab view.
Declaration
nonisolated init(value: Value, role: TabRole?, @ViewBuilder content: () -> Content, @ViewBuilder label: () -> Label)Parameters
- value:
The
selectionvalue which selects this tab. - role:
The role defining the semantic purpose of the tab.
- content:
The view content of the tab.
- label:
The label for the tab’s tab item.