Skip to content

docs: Native Stack - presentation #1354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
45 changes: 43 additions & 2 deletions versioned_docs/version-7.x/native-stack-navigator.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,8 @@ Requires `react-native-screens` version >=3.3.0.

Only supported on iOS.

<img src="/assets/7.x/native-stack/headerBackButtonMenuEnabled.png" width="500" alt="Header back button menu enabled" />

#### `headerBackVisible`

Whether the back button is visible in the header. You can use it to show a back button alongside `headerLeft` if you have specified it.
Expand All @@ -178,6 +180,8 @@ Title string used by the back button on iOS. Defaults to the previous scene's ti

Only supported on iOS.

<img src="/assets/7.x/native-stack/headerBackTitle.jpeg" width="500" alt="Header back title" />

#### `headerBackTitleVisible`

Whether the back button title should be visible or not.
Expand All @@ -193,6 +197,17 @@ Style object for header back title. Supported properties:

Only supported on iOS.

<img src="/assets/7.x/native-stack/headerBackTitleStyle.png" width="500" alt="Header back title style" />

Example:

```js
headerBackTitleStyle: {
fontSize: 14,
fontFamily: 'Georgia',
},
```

#### `headerBackImageSource`

Image to display in the header as the icon in the back button. Defaults to back icon image for the platform
Expand Down Expand Up @@ -662,17 +677,43 @@ Supported values:

How should the screen be presented.

Only supported on Android and iOS.

Supported values:

- `card`: the new screen will be pushed onto a stack, which means the default animation will be slide from the side on iOS, the animation on Android will vary depending on the OS version and theme.
<video playsInline autoPlay muted loop>
<source src="/assets/7.x/native-stack/presentation-card.mp4" />
</video>

- `modal`: the new screen will be presented modally. this also allows for a nested stack to be rendered inside the screen.
<video playsInline autoPlay muted loop>
<source src="/assets/7.x/native-stack/presentation-modal.mp4" />
</video>

- `transparentModal`: the new screen will be presented modally, but in addition, the previous screen will stay so that the content below can still be seen if the screen has translucent background.
<video playsInline autoPlay muted loop>
<source src="/assets/7.x/native-stack/presentation-transparentModal.mp4" />
</video>

- `containedModal`: will use "UIModalPresentationCurrentContext" modal style on iOS and will fallback to "modal" on Android.
<video playsInline autoPlay muted loop>
<source src="/assets/7.x/native-stack/presentation-containedModal.mp4" />
</video>

- `containedTransparentModal`: will use "UIModalPresentationOverCurrentContext" modal style on iOS and will fallback to "transparentModal" on Android.
<video playsInline autoPlay muted loop>
<source src="/assets/7.x/native-stack/presentation-containedTransparentModal.mp4" />
</video>

- `fullScreenModal`: will use "UIModalPresentationFullScreen" modal style on iOS and will fallback to "modal" on Android. A screen using this presentation style can't be dismissed by gesture.
<video playsInline autoPlay muted loop>
<source src="/assets/7.x/native-stack/presentation-fullScreenModal.mp4" />
</video>
- `formSheet`: will use "UIModalPresentationFormSheet" modal style on iOS and will fallback to "modal" on Android.

Only supported on Android and iOS.
<video playsInline autoPlay muted loop>
<source src="/assets/7.x/native-stack/presentation-formSheet.mp4" />
</video>

#### `orientation`

Expand Down
Loading