Navigation/DSSubnavigation

DSSubnavigation

navigation
since 1.2.0

Horizontal bar of selectable items for secondary navigation.

iOSmacOS

Purpose

Use for sub-sections within a page or secondary navigation options. Lighter weight than DSTabBar.

Props

PropTypeDefaultDescription
itemsreq[String]Navigation item labels
selectionreqBinding<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

Related Components