Skip to content

@gtkx/react / NavigationPageProps

Type Alias: NavigationPageProps

NavigationPageProps = NavigationPageBaseProps & object | NavigationPageBaseProps & object

Defined in: packages/react/src/jsx.ts:639

Props for the NavigationPage virtual element with type-safe targeting.

The for prop is required and determines valid id values:

  • AdwNavigationView: id can be any string (page tags for navigation history)
  • AdwNavigationSplitView: id is narrowed to "content" | "sidebar" (slot positions)

Example

tsx
// In NavigationView - id can be any string
<AdwNavigationView history={["home", "details"]}>
  <x.NavigationPage for={AdwNavigationView} id="home" title="Home">
    <HomeContent />
  &lt;/x.NavigationPage>
&lt;/AdwNavigationView>

// In NavigationSplitView - id is narrowed to "content" | "sidebar"
&lt;AdwNavigationSplitView>
  &lt;x.NavigationPage for={AdwNavigationSplitView} id="sidebar" title="Sidebar">
    <SidebarContent />
  &lt;/x.NavigationPage>
  &lt;x.NavigationPage for={AdwNavigationSplitView} id="content" title="Content">
    <MainContent />
  &lt;/x.NavigationPage>
&lt;/AdwNavigationSplitView>