NavigationBar
Custom navigation header with title, subtitle, and action slots.
s0 add navigation-bar
Usage
S0.NavigationBar(title: "Settings")S0.NavigationBar(title: "Profile", subtitle: "Edit your info") {
S0.Button(variant: .ghost, size: .icon, action: { goBack() }) {
Image(systemName: "chevron.left")
}
} trailing: {
S0.Button(variant: .ghost, size: .icon, action: { }) {
Image(systemName: "gearshape")
}
}Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| title | String | — | Primary title text. |
| subtitle | String? | nil | Optional subtitle below the title. |
| leading | @ViewBuilder () -> Leading | — | View displayed on the leading (left) side. |
| trailing | @ViewBuilder () -> Trailing | — | View displayed on the trailing (right) side. |