@@ -231,6 +231,20 @@ Use this prop to have a semi-transparent dark overlay visible under the card dur
231
231
232
232
Function which returns a React Element to display as the overlay for the card. Make sure to set ` cardOverlayEnabled ` to ` true ` when using this.
233
233
234
+ <video playsInline autoPlay muted loop >
235
+ <source src =" /assets/7.x/stack/cardOverlay.mp4 " />
236
+ </video >
237
+
238
+ Example:
239
+ ``` js
240
+ screenOptions= {{
241
+ cardOverlayEnabled: true ,
242
+ cardOverlay : () => (
243
+ < View style= {{ flex: 1 , backgroundColor: ' gray' , opacity: 0.5 }} / >
244
+ ),
245
+ }}
246
+ ```
247
+
234
248
#### ` cardStyle `
235
249
236
250
Style object for the card in stack. You can provide a custom background color to use instead of the default background here.
@@ -244,26 +258,45 @@ On Web, the height of the screen isn't limited to the height of the viewport. Th
244
258
This is shortcut option which configures several options to configure the style for rendering and transitions:
245
259
246
260
- ` card ` : Use the default OS animations for iOS and Android screen transitions.
261
+ <video playsInline autoPlay muted loop >
262
+ <source src =" /assets/7.x/stack/presentation-card.mp4 " />
263
+ </video >
264
+
247
265
- ` modal ` : Use Modal animations. This changes a few things:
248
266
- Sets ` headerMode ` to ` screen ` for the screen unless specified otherwise.
249
267
- Changes the screen animation to match the platform behavior for modals.
268
+ <video playsInline autoPlay muted loop >
269
+ <source src =" /assets/7.x/stack/presentation-modal.mp4 " />
270
+ </video >
271
+
250
272
- ` transparentModal ` : Similar to ` modal ` . This changes following things:
251
273
- Sets ` headerMode ` to ` screen ` for the screen unless specified otherwise.
252
274
- Sets background color of the screen to transparent, so previous screen is visible
253
275
- Adjusts the ` detachPreviousScreen ` option so that the previous screen stays rendered.
254
276
- Prevents the previous screen from animating from its last position.
255
277
- Changes the screen animation to a vertical slide animation.
278
+
279
+ See [ Transparent modals] ( #transparent-modals ) for more details on how to customize ` transparentModal ` .
280
+
281
+ <video playsInline autoPlay muted loop >
282
+ <source src =" /assets/7.x/stack/presentation-transparentModal.mp4 " />
283
+ </video >
284
+
256
285
257
- See [ Transparent modals] ( #transparent-modals ) for more details on how to customize ` transparentModal ` .
258
286
259
287
#### ` animationTypeForReplace `
260
288
261
289
The type of animation to use when this screen replaces another screen. It takes the following values:
262
290
263
- - ` push ` - The animation of a new screen being pushed will be used
264
- - ` pop ` - The animation of a screen being popped will be used
291
+ - ` push ` - (default) The animation of a new screen being pushed will be used
292
+ <video playsInline autoPlay muted loop >
293
+ <source src =" /assets/7.x/stack/animationTypeForReplace-push.mp4 " />
294
+ </video >
265
295
266
- Defaults to ` push ` .
296
+ - ` pop ` - The animation of a screen being popped will be used
297
+ <video playsInline autoPlay muted loop >
298
+ <source src =" /assets/7.x/stack/animationTypeForReplace-pop.mp4 " />
299
+ </video >
267
300
268
301
When ` pop ` is used, the ` pop ` animation is applied to the screen being replaced.
269
302
@@ -415,7 +448,14 @@ return (
415
448
Specifies how the header should be rendered:
416
449
417
450
- ` float ` - Render a single header that stays at the top and animates as screens are changed. This is default on iOS.
451
+ <video playsInline autoPlay muted loop >
452
+ <source src =" /assets/7.x/stack/headerMode-float.mp4 " />
453
+ </video >
454
+
418
455
- ` screen ` - Each screen has a header attached to it and the header fades in and out together with the screen. This is default on other platforms.
456
+ <video playsInline autoPlay muted loop >
457
+ <source src =" /assets/7.x/stack/headerMode-screen.mp4 " />
458
+ </video >
419
459
420
460
#### ` headerShown `
421
461
@@ -433,6 +473,18 @@ Accessibility label for the header back button.
433
473
434
474
Function which returns a React Element to display custom image in header's back button. When a function is used, it receives the ` tintColor ` in it's argument object. Defaults to Image component with back image source, which is the default back icon image for the platform (a chevron on iOS and an arrow on Android).
435
475
476
+ <img src =" /assets/7.x/stack/headerBackImage.png " width =" 500 " alt =" Header back image " />
477
+
478
+ ``` js
479
+ headerBackImage : ({ tintColor }) => (
480
+ < Ionicons
481
+ tyle= {{ color: tintColor }}
482
+ size= {26 }
483
+ name= " arrow-back-circle"
484
+ / >
485
+ ),
486
+ ```
487
+
436
488
#### ` headerBackTitle `
437
489
438
490
Title string used by the back button on iOS. Defaults to the previous scene's title. Use ` headerBackButtonDisplayMode ` to customize the behavior.
0 commit comments