Navigation
NavLink
A tappable label that pushes a view onto the enclosing NavStack.
NavLink renders as an accent-colored, tappable text label. Tapping it
pushes dest onto the stack.
dest can be:
- A
View. - A
Viewablestruct value (constructed eagerly, butBodyruns only when the link is tapped). - A
func() Viewfor fully lazy construction when the view itself is expensive to build. - A
func() anywhen the lazy constructor returns a Viewable.
Behind the scenes, NavLink is a Define component that resolves UseNav
at render time and wires the tap handler. It also sets the RoleLink
accessibility role and copies the label to the accessibility label.