Skip to content

Tabs - iOS ​

Tabs are used to group content, allowing users to navigate views without.

AndroidreleasedElementsreleasediOSreleasedReactreleasedVuereleased

iOS ​

Syntax ​

swift
Warp.Tabs(
    tabs: [TabItem],
    selectedIndex: Binding<Int>
)

Warp.TabItem(
    title: String,
    icon: Warp.Icon? = nil
)
swift
Warp.Tabs(
    tabs: tabItems,
    selectedIndex: $selectedIndex
)

Warp.TabItem(
    title: "Title",
    icon: .plus
)

Legacy support ​

By default all Warp components return a SwiftUI View but there is always a UIKit UIView available to use also.

swift
Warp.Tabs(
    tabs: tabItems,
    selectedIndex: $selectedIndex
).uiView

Parameters ​

Required props ​

NameTypeDefaultDescription
tabs[Warp.TabItem]An array of Warp.TabItem objects to display as selectable tabs.
selectedIndexBinding IntA binding to the index of the currently selected tab.

Questions? ​

Feel free to ask any questions on usage in the Warp DS Slack channel: #warp-design-system