@@ -231,14 +231,25 @@ Supported properties:
231
231
232
232
Only supported on iOS.
233
233
234
+ <video playsInline autoPlay muted loop style={{ width: "500px" }}>
235
+
236
+ <source src =" /assets/7.x/native-stack/headerLargeStyle.mp4 " />
237
+ </video >
238
+
234
239
#### ` headerLargeTitle `
235
240
236
241
Whether to enable header with large title which collapses to regular header on scroll.
242
+ Defaults to ` false ` .
237
243
238
244
For large title to collapse on scroll, the content of the screen should be wrapped in a scrollable view such as ` ScrollView ` or ` FlatList ` . If the scrollable area doesn't fill the screen, the large title won't collapse on scroll. You also need to specify ` contentInsetAdjustmentBehavior="automatic" ` in your ` ScrollView ` , ` FlatList ` etc.
239
245
240
246
Only supported on iOS.
241
247
248
+ <video playsInline autoPlay muted loop style={{ width: "500px" }}>
249
+
250
+ <source src =" /assets/7.x/native-stack/headerLargeTitle.mp4 " />
251
+ </video >
252
+
242
253
#### ` headerLargeTitleShadowVisible `
243
254
244
255
Whether drop shadow of header is visible when a large title is shown.
@@ -254,6 +265,19 @@ Style object for large title in header. Supported properties:
254
265
255
266
Only supported on iOS.
256
267
268
+ <img src =" /assets/7.x/native-stack/headerLargeTitleStyle.png " width =" 500 " alt =" Header large title style " />
269
+
270
+ Example:
271
+
272
+ ``` js
273
+ headerLargeTitleStyle: {
274
+ fontFamily: ' Georgia' ,
275
+ fontSize: 22 ,
276
+ fontWeight: ' 500' ,
277
+ color: ' blue' ,
278
+ },
279
+ ```
280
+
257
281
#### ` headerShown `
258
282
259
283
Whether to show the header. The header is shown by default. Setting this to ` false ` hides the header.
@@ -264,10 +288,21 @@ Style object for header. Supported properties:
264
288
265
289
- ` backgroundColor `
266
290
291
+ <video playsInline autoPlay muted loop style={{ width: "500px" }}>
292
+
293
+ <source src =" /assets/7.x/native-stack/headerStyle.mp4 " />
294
+ </video >
295
+
267
296
#### ` headerShadowVisible `
268
297
269
298
Whether to hide the elevation shadow (Android) or the bottom border (iOS) on the header.
270
299
300
+ Android:
301
+ <img src =" /assets/7.x/native-stack/headerShadowVisible-Android.png " width =" 500 " alt =" Header shadow visible Android " />
302
+
303
+ iOS:
304
+ <img src =" /assets/7.x/native-stack/headerShadowVisible-iOS.png " width =" 500 " alt =" Header shadow visible iOS " />
305
+
271
306
#### ` headerTransparent `
272
307
273
308
Boolean indicating whether the navigation bar is translucent.
@@ -287,44 +322,117 @@ Blur effect for the translucent header. The `headerTransparent` option needs to
287
322
Supported values:
288
323
289
324
- ` extraLight `
325
+
290
326
- ` light `
327
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-light.png " width =" 500 " alt =" Header blur effect light " />
328
+
291
329
- ` dark `
330
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-dark.png " width =" 500 " alt =" Header blur effect dark " />
331
+
292
332
- ` regular `
333
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-regular.png " width =" 500 " alt =" Header blur effect regular " />
334
+
293
335
- ` prominent `
336
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemUltraThinMaterial.png " width =" 500 " alt =" Header blur effect systemUltraThinMaterial " />
337
+
294
338
- ` systemUltraThinMaterial `
339
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemUltraThinMaterial.png " width =" 500 " alt =" Header blur effect systemUltraThinMaterial " />
340
+
295
341
- ` systemThinMaterial `
342
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemThinMaterial.png " width =" 500 " alt =" Header blur effect systemThinMaterial " />
343
+
296
344
- ` systemMaterial `
345
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemMaterial.png " width =" 500 " alt =" Header blur effect systemMaterial " />
346
+
297
347
- ` systemThickMaterial `
348
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemThickMaterial.png " width =" 500 " alt =" Header blur effect systemThickMaterial " />
349
+
298
350
- ` systemChromeMaterial `
351
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemChromeMaterial.png " width =" 500 " alt =" Header blur effect systemChromeMaterial " />
352
+
299
353
- ` systemUltraThinMaterialLight `
354
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemUltraThinMaterialLight.png " width =" 500 " alt =" Header blur effect systemUltraThinMaterialLight " />
355
+
300
356
- ` systemThinMaterialLight `
357
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemThinMaterialLight.png " width =" 500 " alt =" Header blur effect systemThinMaterialLight " />
358
+
301
359
- ` systemMaterialLight `
360
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemMaterialLight.png " width =" 500 " alt =" Header blur effect systemMaterialLight " />
361
+
302
362
- ` systemThickMaterialLight `
363
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemThickMaterialLight.png " width =" 500 " alt =" Header blur effect systemThickMaterialLight " />
364
+
303
365
- ` systemChromeMaterialLight `
366
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemChromeMaterialLight.png " width =" 500 " alt =" Header blur effect systemChromeMaterialLight " />
367
+
304
368
- ` systemUltraThinMaterialDark `
369
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemUltraThinMaterialDark.png " width =" 500 " alt =" Header blur effect systemUltraThinMaterialDark " />
305
370
- ` systemThinMaterialDark `
371
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemThinMaterialDark.png " width =" 500 " alt =" Header blur effect systemThinMaterialDark " />
372
+
306
373
- ` systemMaterialDark `
374
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemMaterialDark.png " width =" 500 " alt =" Header blur effect systemMaterialDark " />
307
375
- ` systemThickMaterialDark `
376
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemThickMaterialDark.png " width =" 500 " alt =" Header blur effect systemThickMaterialDark " />
377
+
308
378
- ` systemChromeMaterialDark `
379
+ <img src =" /assets/7.x/native-stack/headerBlurEffect-systemChromeMaterialDark.png " width =" 500 " alt =" Header blur effect systemChromeMaterialDark " />
309
380
310
381
Only supported on iOS.
311
382
312
383
#### ` headerBackground `
313
384
314
385
Function which returns a React Element to render as the background of the header. This is useful for using backgrounds such as an image or a gradient.
315
386
387
+ <img src =" /assets/7.x/native-stack/headerBackground.png " width =" 500 " alt =" Header background " />
388
+
389
+ Example:
390
+
391
+ ``` js
392
+ headerBackground : () => (
393
+ < LinearGradient
394
+ colors= {[' #c17388' , ' #90306f' ]}
395
+ style= {{ flex: 1 }}
396
+ start= {{ x: 0 , y: 0 }}
397
+ end= {{ x: 1 , y: 0 }}
398
+ / >
399
+ ),
400
+ ```
401
+
316
402
#### ` headerTintColor `
317
403
318
404
Tint color for the header. Changes the color of back button and title.
319
405
406
+ <img src =" /assets/7.x/native-stack/headerTintColor.png " width =" 500 " alt =" Header tint color " />
407
+
320
408
#### ` headerLeft `
321
409
322
410
Function which returns a React Element to display on the left side of the header. This replaces the back button. See ` headerBackVisible ` to show the back button along side left element.
323
411
412
+ <img src =" /assets/7.x/native-stack/headerLeft.png " width =" 500 " alt =" Header right " />
413
+
414
+ Example:
415
+
416
+ ``` js
417
+ headerLeft : () => (
418
+ < MaterialCommunityIcons name= " map" color= " gray" size= {36 } / >
419
+ ),
420
+ headerBackVisible: true ,
421
+ headerBackTitle: ' Back' ,
422
+ ```
423
+
324
424
#### ` headerRight `
325
425
326
426
Function which returns a React Element to display on the right side of the header.
327
427
428
+ <img src =" /assets/7.x/native-stack/headerRight.png " width =" 500 " alt =" Header right " />
429
+
430
+ Example:
431
+
432
+ ``` js
433
+ headerRight : () => < MaterialCommunityIcons name= " map" color= " blue" size= {36 } / > ;
434
+ ```
435
+
328
436
#### ` headerTitle `
329
437
330
438
String or a function that returns a React Element to be used by the header. Defaults to ` title ` or name of the screen.
@@ -338,7 +446,10 @@ Note that if you render a custom element by passing a function, animations for t
338
446
How to align the header title. Possible values:
339
447
340
448
- ` left `
449
+ <img src =" /assets/7.x/native-stack/headerTitleAlign-left.png " width =" 500 " alt =" Header title align left " />
450
+
341
451
- ` center `
452
+ <img src =" /assets/7.x/native-stack/headerTitleAlign-center.png " width =" 500 " alt =" Header title align center " />
342
453
343
454
Defaults to ` left ` on platforms other than iOS.
344
455
@@ -353,6 +464,19 @@ Style object for header title. Supported properties:
353
464
- ` fontWeight `
354
465
- ` color `
355
466
467
+ <img src =" /assets/7.x/native-stack/headerTitleStyle.png " width =" 500 " alt =" Header title style " />
468
+
469
+ Example:
470
+
471
+ ``` js
472
+ headerTitleStyle: {
473
+ color: ' blue' ,
474
+ fontSize: 22 ,
475
+ fontFamily: ' Georgia' ,
476
+ fontWeight: 300 ,
477
+ },
478
+ ```
479
+
356
480
#### ` headerSearchBarOptions `
357
481
358
482
Options to render a native search bar on iOS. Search bars are rarely static so normally it is controlled by passing an object to ` headerSearchBarOptions ` navigation option in the component's body. You also need to specify ` contentInsetAdjustmentBehavior="automatic" ` in your ` ScrollView ` , ` FlatList ` etc. If you don't have a ` ScrollView ` , specify ` headerTransparent: false ` .
0 commit comments