Skip to main content

Layout & Navigation

PrismUI provides layout primitives that adapt to screen size and platform, plus navigation components that bridge PrismArchitecture’s router with SwiftUI.

PrismGrid

Responsive grid that automatically adapts column count based on available width:
Responsive Grid
The grid uses LazyVGrid with .adaptive(minimum:) under the hood — on iPhone it shows 1 column, on iPad 2–3, on Mac as many as fit.

PrismStack

A directional stack that switches between HStack and VStack based on a size threshold:
Adaptive Stack

PrismSection

Themed section container with optional header, footer, and dividers:
Section

PrismScaffold

Full-screen scaffold with a structured header, content area, and footer:
Scaffold

PrismDepthStack

A visionOS spatial layout container for placing views at different depth levels:
Depth Stack (visionOS)

PrismSpacer

Token-aware spacer that uses SpacingToken values:
Spacer

Navigation

PrismNavigationView

Bridges PrismRouter from the Architecture module with SwiftUI’s NavigationStack, sheets, and full-screen covers:
Navigation Setup
Navigate with the router’s type-safe API:
Navigation Actions

PrismTabView

Themed tab bar with badge support:
Tab View

PrismSplitView

Adaptive sidebar navigation for iPad and Mac:
Split View

PrismSheet

Themed sheet presentation with detents:
Sheet

Platform-Specific

PrismNavigationView handles the binding between PrismRouter.path, presentedRoute, and fullScreenRoute automatically. You only interact with the router — the SwiftUI bindings are managed for you.