DashboardPage
The phone's page layouts that match genesis-ui's: DashboardPage, DetailPage, DocumentPage and FormPage, with the same names and props (`title`, `subtitle`, `actions`, `stats`, `sidebar`, `cover`, `icon`, `errors`…). Each is a ScreenContainer (safe areas, theme background, pull to refresh, a loading state) with the page's title block and body, so a screen passes content and never draws the chrome. On a phone the stack header usually shows the screen's title too: pass `hideTitle` to leave the in-page title out, or give the stack the same title with `composeHeaderOptions`.
packages/ui-native/src/layouts/pages.tsx
Import
Subpath export:
@marktiderman/genesis-ui-nativeimport { DashboardPage } from "@marktiderman/genesis-ui-native";Components
Auto-generated from TypeScript source via
react-docgen-typescript.DashboardPage
| Prop | Type | Default | Description |
|---|---|---|---|
| title* | ReactNode | — | |
| actions | ReactNode | — | |
| className | string | — | Override root container className. |
| contentClassName | string | — | Override inner content container className (the ScrollView's contentContainerClassName when scroll=true). Without `scroll`, a list under a large title should leave this to layout only: a background or border keeps the body a native view of its own, and iOS then can't collapse the title as the list scrolls (put the background on the list instead). |
| hideTitle | boolean | — | Leave the in-page title out (the stack header shows it). |
| loading | boolean | — | When `true`, a centred `NativeLoadingState` (theme-tinted spinner, announced as loading) replaces the body, inside the same safe area and background. Use it for redirect and first-load screens: the body is unmounted while it's on, so a form underneath loses its state. Default `false`. |
| loadingLabel | string | — | Text under the spinner while `loading`, and what screen readers announce: pass translated text. |
| onRefresh | (() => void | Promise<void>) | — | Pull to refresh: a theme-tinted `NativeRefreshControl` on the body, as InboxPage and NotificationsPage have. Pulling needs a scroll view, so passing it makes the body scroll (as `scroll`). Off unless passed. Never with a list child (FlatList, SectionList, NativeResourceView, InboxPage): a list inside a ScrollView loses virtualization, and those lists have their own pull to refresh. |
| refreshing | boolean | — | The refresh spinner shows while `true`: pass your query's refetching state. Default `false`. |
| safeAreaEdges | SafeAreaEdge[] | — | SafeAreaView edges. Defaults to `["left", "right"]` — top/bottom are normally handled by the navigation header / tab bar. |
| statColumns | enum | 2 | Tiles per row. Default 2. |
| stats | ReactNode | — | Stat tiles (NativeStatCard), two to a row. |
| subtitle | ReactNode | — | |
| testID | string | dashboard-page |
DetailPage
| Prop | Type | Default | Description |
|---|---|---|---|
| title* | ReactNode | — | |
| actions | ReactNode | — | |
| breadcrumb | ReactNode | — | Above the title (a parent's name). |
| className | string | — | Override root container className. |
| contentClassName | string | — | Override inner content container className (the ScrollView's contentContainerClassName when scroll=true). Without `scroll`, a list under a large title should leave this to layout only: a background or border keeps the body a native view of its own, and iOS then can't collapse the title as the list scrolls (put the background on the list instead). |
| hideTitle | boolean | — | Leave the in-page title out (the stack header shows it). |
| loading | boolean | — | When `true`, a centred `NativeLoadingState` (theme-tinted spinner, announced as loading) replaces the body, inside the same safe area and background. Use it for redirect and first-load screens: the body is unmounted while it's on, so a form underneath loses its state. Default `false`. |
| loadingLabel | string | — | Text under the spinner while `loading`, and what screen readers announce: pass translated text. |
| onRefresh | (() => void | Promise<void>) | — | Pull to refresh: a theme-tinted `NativeRefreshControl` on the body, as InboxPage and NotificationsPage have. Pulling needs a scroll view, so passing it makes the body scroll (as `scroll`). Off unless passed. Never with a list child (FlatList, SectionList, NativeResourceView, InboxPage): a list inside a ScrollView loses virtualization, and those lists have their own pull to refresh. |
| refreshing | boolean | — | The refresh spinner shows while `true`: pass your query's refetching state. Default `false`. |
| safeAreaEdges | SafeAreaEdge[] | — | SafeAreaView edges. Defaults to `["left", "right"]` — top/bottom are normally handled by the navigation header / tab bar. |
| sidebar | ReactNode | — | The web's side column; on a phone it follows the content. |
| subtitle | ReactNode | — | |
| testID | string | detail-page |
DocumentPage
| Prop | Type | Default | Description |
|---|---|---|---|
| title* | ReactNode | — | |
| actions | ReactNode | — | |
| className | string | — | Override root container className. |
| contentClassName | string | — | Override inner content container className (the ScrollView's contentContainerClassName when scroll=true). Without `scroll`, a list under a large title should leave this to layout only: a background or border keeps the body a native view of its own, and iOS then can't collapse the title as the list scrolls (put the background on the list instead). |
| cover | ReactNode | — | A banner across the top: an image URL, or your own node. |
| hideTitle | boolean | — | Leave the in-page title out (the stack header shows it). |
| icon | ReactNode | — | An emoji, an image or an icon over the title. |
| loading | boolean | — | When `true`, a centred `NativeLoadingState` (theme-tinted spinner, announced as loading) replaces the body, inside the same safe area and background. Use it for redirect and first-load screens: the body is unmounted while it's on, so a form underneath loses its state. Default `false`. |
| loadingLabel | string | — | Text under the spinner while `loading`, and what screen readers announce: pass translated text. |
| onRefresh | (() => void | Promise<void>) | — | Pull to refresh: a theme-tinted `NativeRefreshControl` on the body, as InboxPage and NotificationsPage have. Pulling needs a scroll view, so passing it makes the body scroll (as `scroll`). Off unless passed. Never with a list child (FlatList, SectionList, NativeResourceView, InboxPage): a list inside a ScrollView loses virtualization, and those lists have their own pull to refresh. |
| refreshing | boolean | — | The refresh spinner shows while `true`: pass your query's refetching state. Default `false`. |
| safeAreaEdges | SafeAreaEdge[] | — | SafeAreaView edges. Defaults to `["left", "right"]` — top/bottom are normally handled by the navigation header / tab bar. |
| subtitle | ReactNode | — | |
| testID | string | document-page | |
| width | enum | reading | `reading` (default) keeps a reading column on a tablet; `full` uses the width. |
FormPage
| Prop | Type | Default | Description |
|---|---|---|---|
| title* | ReactNode | — | |
| actions | ReactNode | — | The Save / Cancel row. It stays above the keyboard: through the app's keyboard-aware scroll view and `KeyboardStickyView` when it gave them (`KeyboardScrollProvider`), else in a KeyboardAvoidingView. With a keyboard-aware scroll view but no sticky view, it ends the form. A touch on it dismisses the keyboard first, so the focused field commits what's typed before the button's press runs. |
| className | string | — | Override root container className. |
| contentClassName | string | — | Override inner content container className (the ScrollView's contentContainerClassName when scroll=true). Without `scroll`, a list under a large title should leave this to layout only: a background or border keeps the body a native view of its own, and iOS then can't collapse the title as the list scrolls (put the background on the list instead). |
| description | ReactNode | — | |
| errors | ReactNode | — | A summary of what to fix, over the fields. |
| hideTitle | boolean | — | |
| loading | boolean | — | When `true`, a centred `NativeLoadingState` (theme-tinted spinner, announced as loading) replaces the body, inside the same safe area and background. Use it for redirect and first-load screens: the body is unmounted while it's on, so a form underneath loses its state. Default `false`. |
| loadingLabel | string | — | Text under the spinner while `loading`, and what screen readers announce: pass translated text. |
| onRefresh | (() => void | Promise<void>) | — | Pull to refresh: a theme-tinted `NativeRefreshControl` on the body, as InboxPage and NotificationsPage have. Pulling needs a scroll view, so passing it makes the body scroll (as `scroll`). Off unless passed. Never with a list child (FlatList, SectionList, NativeResourceView, InboxPage): a list inside a ScrollView loses virtualization, and those lists have their own pull to refresh. |
| refreshing | boolean | — | The refresh spinner shows while `true`: pass your query's refetching state. Default `false`. |
| safeAreaEdges | SafeAreaEdge[] | — | SafeAreaView edges. Defaults to `["left", "right"]` — top/bottom are normally handled by the navigation header / tab bar. |
| testID | string | form-page |