Vertical Default

nav-vertical-default

@State private var selectedVDefault: Int = 1

PBNav(
        selected: $selectedVDefault,
        variant: .normal,
        orientation: .vertical,
        title: "Menu"
      ) {
        PBNavItem("Photos")
        PBNavItem("Music")
        PBNavItem("Video")
        PBNavItem("Files")
      }

Vertical Subtle

nav-vertical-subtle

@State private var selectedVSubtle: Int = 1

PBNav(
        selected: $selectedVSubtle,
        variant: .subtle,
        orientation: .vertical,
        borders: false
      ) {
        PBNavItem("Photos")
        PBNavItem("Music")
        PBNavItem("Video")
        PBNavItem("Files")
      }
Vertical Subtle No Highlight

nav-vertical-subtle_no-highlight

@State private var selectedVSubtleNoHighlight: Int = 1

PBNav(
        selected: $selectedVSubtleNoHighlight,
        variant: .subtle,
        orientation: .vertical,
        borders: false,
        highlight: false
      ) {
        PBNavItem("Photos")
        PBNavItem("Music")
        PBNavItem("Video")
        PBNavItem("Files")
      }

Vertical Bold

nav-vertical-bold

 @State private var selectedVBold: Int = 1

PBNav(
        selected: $selectedVBold,
        variant: .bold,
        orientation: .vertical,
        borders: false
      ) {
        PBNavItem("Photos")
        PBNavItem("Music")
        PBNavItem("Video")
        PBNavItem("Files")
      }

Horizontal Default

nav-horizontal-default

 @State private var selectedHDefault: Int = 1

 PBNav(
          selected: $selectedHDefault,
          variant: .normal,
          orientation: .horizontal
        ) {
          PBNavItem("Photos")
          PBNavItem("Music")
          PBNavItem("Video")
          PBNavItem("Files")
        }

Horizontal Subtle

nav-horizontal-subtle

@State private var selectedHSubtle: Int = 1

PBNav(
        selected: $selectedHSubtle,
        variant: .subtle,
        orientation: .horizontal,
        borders: false
      ) {
        PBNavItem("Photos")
        PBNavItem("Music")
        PBNavItem("Video")
        PBNavItem("Files")
      }

Horizontal Subtle No Highlight

nav-horizontal-subtle-no-highlight

@State private var selectedHSubtleNoHighlight: Int = 1

 PBNav(
        selected: $selectedHSubtleNoHighlight,
        variant: .subtle,
        orientation: .horizontal,
        borders: false,
        highlight: false
      ) {
        PBNavItem("Photos")
        PBNavItem("Music")
        PBNavItem("Video")
        PBNavItem("Files")
      }
Horizontal Bold

nav-horizontal-bold

@State private var selectedHBold: Int = 1

PBNav(
        selected: $selectedHBold,
        variant: .bold,
        orientation: .horizontal,
        borders: false
      ) {
        PBNavItem("Photos")
        PBNavItem("Music")
        PBNavItem("Video")
        PBNavItem("Files")
      }

Props

Name Type Description Default Values
selected Int Sets selected to current index 0
currentHover Int? Sets the current hover state to the current index
variant Variant Sets variant for nav .normal normal subtle bold
orientation Orientation Changes the orientation of nav .vertical horizontal verticle
title String? Sets title of nav
borders Bool Boolean value for whether nav items have a border or not true true false
highlight Bool Boolean value for adding a highlight to nav true true false
views [AnyView] An Array of AnyView

UI Samples using Nav Kit

Get the full picture. See how this kit is used in our samples.