Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

tabItem(_:)

Sets the label of a view in a TabView.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.tabItem(label: @Composable () -> Unit): Modifier

Overview

Prefer Tab(title, systemImage, value).

Modifier.tabItem()

This is the Kotlin form of SwiftUI View.tabItem(_:): SwiftUI documentation. In Swift it reads:

nonisolated func tabItem<V>(@ContentBuilder _ label: () -> V) -> some View where V : View

Topics

Overloads

fun Modifier.tabItem(label: @Composable () -> Unit): Modifier
SwiftUI View.tabItem(_:)