Declaration
import { Tabs } from 'swiftui-react-native';Parts
Compose these together. Each part renders as part of one SwiftUI view.
<Tabs.Root
value?: string
defaultValue?: string
onValueChange?: (value: string) => void
>
children?: ReactNode
</Tabs.Root>valuestringThe selected tab (controlled).
defaultValuestringThe initially selected tab (uncontrolled).
onValueChange(value: string) => voidCalled when the user selects a tab.
childrenReactNode
Also takes the common view props: modifiers, style and testID.
Relationships
SwiftUI declarations
nonisolated init<C>(
selection: Binding<SelectionValue>,
@TabContentBuilder<SelectionValue> content: () -> C
)
where Content == TabContentBuilder<SelectionValue>.Content<C>, C : TabContentnonisolated init<S>(
_ title: S,
systemImage: String,
value: Value,
@ContentBuilder content: () -> Content
)
where Label == DefaultTabLabel, S : StringProtocolnonisolated func tabItem<V>(
@ContentBuilder _ label: () -> V
) -> some View
where V : View@export(implementation) nonisolated func tag<V>(
_ tag: V,
includeOptional: Bool = true
) -> some View
where V : HashableSee also
More in Navigation.
- LinkA control for navigating to a URL.
- NavigationLinkA view that controls a navigation presentation.
- NavigationSplitViewA view that presents views in two or three columns, where selections in leading columns control presentations in subsequent columns.
- NavigationStackA view that displays a root view and enables you to present additional views over the root view.
- ShareLinkA view that controls a sharing presentation.
- TabThe content for a tab and the tab's associated tab item in a tab view.
- TabSectionA container that you can use to add hierarchy within a tab view.
- TabViewA view that switches between multiple child views using interactive user interface elements.