Tab

The content for a tab and the tab's associated tab item in a tab view.

ComponentiOS 18.0+macOS 15.0+tvOS 18.0+visionOS 2.0+watchOS 11.0+Tab in SwiftUI

Declaration

React
import { Tab } from 'swiftui-react-native';
Swift
struct Tab<Value, Content, Label>

Initializers

24 SwiftUI initializers back <Tab>. The props you pass pick one.

React
<Tab>
  children?: ReactNode
</Tab>
Swift
init(@ContentBuilder content: () -> Content) where Label == EmptyView
  • childrenReactNode

    Content. Strings become Text; React Native views are laid out by Yoga and placed by SwiftUI.

    Swift content: () -> Content

Also takes the common view props: modifiers, style and testID.

See also

More in Navigation.