Usage
SwiftUI
M3ENavigationBar(items: [
.init("Home", icon: "home"),
.init("Inbox", icon: "inbox", badge: "3"),
.init("Profile", icon: "person"),
], selection: $tab)API
| Property | SwiftUI | Description |
|---|---|---|
| items | [M3ENavigationItem] | Label, icon, selected icon, badge. |
| selection | selection: Binding<Int> | Current destination. |
| itemLayout | .vertical .horizontal | Horizontal items for medium widths. |
Guidelines
- Three to five destinations.
- Switch to a navigation rail on tablets and desktops.