Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 1.67 KB

File metadata and controls

56 lines (46 loc) · 1.67 KB

HorizontalNavigation

Cocoapods class reference view on Github

Default

Day Night

Usage

@State var selectedTab: Int = 0
BPKHorizontalNavigation(
    tabs: [
        .init(title: "Flights", icon: .flight),
        .init(title: "Hotels", icon: .hotel),
        .init(title: "Cars", icon: .car)
    ],
    selectedTab: $selectedTab
)

Setting the Size

BPkHorizontalNavigation supports both a default and a small size.

@State var selectedTab: Int = 0
BPKHorizontalNavigation(
    tabs: [
        .init(title: "Flights", icon: .flight),
        .init(title: "Hotels", icon: .hotel),
        .init(title: "Cars", icon: .car)
    ],
    size: .small,
    selectedTab: $selectedTab
)

Tabs withou icons

@State var selectedTab: Int = 0
BPKHorizontalNavigation(
    tabs: [
        .init(title: "Flights"),
        .init(title: "Hotels"),
        .init(title: "Cars")
    ],
    selectedTab: $selectedTab
)