Navigation/DSSubnavigation
DSSubnavigation
navigationHorizontal bar of selectable items for secondary navigation.
iOSmacOS
Purpose
Use for sub-sections within a page or secondary navigation options. Lighter weight than DSTabBar.
Interactive Reference
Live showroom
Need the full visual surface?
Screenshots do not scale well across every component, state, and variant. For the real interactive reference, import the package and launch DSShowcaseRoot().
Best for exploring:
variants, states, categories, and real app examples in one place.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| itemsreq | [String] | — | Navigation item labels |
| selectionreq | Binding<String> | — | Binding to selected item |
Examples
Sub-section navigation
Navigate between related sub-sections.
swift
@State var section = "Profile"
DSSubnavigation(
items: ["Profile", "Security", "Notifications"],
selection: $section
)Usage Guidelines
- Use for secondary or nested navigation
- Keep to 3-5 items for clarity
- Use DSTabBar for primary content switching