Compose SwiftUIv0.4.0
esc
GuideAPIGitHub
View modifier

tag(_:)

Identifies a view for a selection, in a Picker or a TabView.

iOS 17.0+macOS 14.0+tvOS 17.0+watchOS 10.0+
fun Modifier.tag(tag: Any, includeOptional: Boolean = true): Modifier

Overview

Modifier.tag(tag = value)

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

@export(implementation) nonisolated func tag<V>(_ tag: V, includeOptional: Bool = true) -> some View where V : Hashable

Topics

Overloads

fun Modifier.tag(tag: Any, includeOptional: Boolean = true): Modifier
SwiftUI View.tag(_:includeOptional:)