Skip to content
View Markdown

NavigationStack ​

A navigation container for moving between declared screens.

tsx
import { NavigationStack, NavigationLink } from '@satinhq/kit'

Example ​

Click Kyoto, change Visited, then click the back button.

Declare the routes ​

Use defineRoutes and route to name each screen. Declare typed parameters with param and register the routes so NavigationLink checks destinations.

Choose the root ​

Declare the primary root in defineNavigation. Without custom content, runApp renders the declared stack. Render NavigationStack or NavigationSplitView yourself when supplying custom app content.

Open a destination ​

NavigationLink uses to and params. The framework owns the in-memory stack and the back button. Try the left-edge back swipe on a device.

API ​

Scroll horizontally to read every column.

PropTypeDescription
tabTabIdSelects a declared primary tab.
modaltrueNavigationStack can own a modal stack.
rootRouteIdRequired only for a modal stack.
toRouteIdA declared destination on NavigationLink.
paramsRouteParametersTyped destination parameters.

Related: Quick start, List, Screen.

:::

Satin runs on the Lumen rendering engine and is open source under the MIT License.