react-native-navigation的迁移库

options-root.mdx 5.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. ---
  2. id: options-root
  3. title: The options object
  4. sidebar_label: Options object
  5. ---
  6. ```js
  7. const options = {
  8. bottomTab,
  9. bottomTabs,
  10. topBar,
  11. layout,
  12. sideMenu,
  13. overlay,
  14. modal,
  15. preview
  16. };
  17. ```
  18. ## `bottomTab`
  19. Controls the bottom tab icon, font, color, and more.
  20. | Type | Required | Platform |
  21. | ------------------------------------- | -------- | -------- |
  22. | [BottomTabOptions](options-bottomTab.mdx) | No | Both |
  23. ## `bottomTabs`
  24. Controls the bottom tabs container.
  25. | Type | Required | Platform |
  26. | --------------------------------------- | -------- | -------- |
  27. | [BottomTabsOptions](options-bottomTabs.mdx) | No | Both |
  28. ## `topBar`
  29. Controls the Stack top bar styling.
  30. | Type | Required | Platform |
  31. | ------------------------------ | -------- | -------- |
  32. | [TopBarOptions](stack-options.mdx) | | No |
  33. ## `statusBar`
  34. Controls the system status bar styling.
  35. | Type | Required | Platform |
  36. | ------------------------------------- | -------- | -------- |
  37. | [StatusBarOptions](statusBar-options.mdx) | No | Both |
  38. ## `layout`
  39. | Type | Required | Platform |
  40. | ------------------------------- | -------- | -------- |
  41. | [LayoutOptions](layout-options.mdx) | No | Both |
  42. ## `sideMenu`
  43. | Type | Required | Platform |
  44. | ----------------------------------- | -------- | -------- |
  45. | [SideMenuOptions](options-sideMenu.mdx) | No | Both |
  46. ## `overlay`
  47. | Type | Required | Platform |
  48. | --------------------------------- | -------- | -------- |
  49. | [OverlayOptions](options-overlay.mdx) | No | Both |
  50. ## `animations`
  51. | Type | Required | Platform |
  52. | --------------------------------------- | -------- | -------- |
  53. | [AnimationsOptions](options-animations.mdx) | No | Both |
  54. ## `modal`
  55. | Type | Required | Platform |
  56. | ----------------------------- | -------- | -------- |
  57. | [ModalOptions](options-modal.mdx) | No | Both |
  58. ## `preview`
  59. | Type | Required | Platform |
  60. | --------------------------------- | -------- | -------- |
  61. | [PreviewOptions](preview-options.mdx) | No | iOS |
  62. ## `splitView`
  63. | Type | Required | Platform |
  64. | ------------------------------------- | -------- | -------- |
  65. | [SplitViewOptions](options-splitView.mdx) | No | iOS |
  66. ## `fab`
  67. | Type | Required | Platform |
  68. | ------------------ | -------- | -------- |
  69. | [Fab](fab-options.mdx) | No | Android |
  70. ## `modalPresentationStyle`
  71. Configure the presentation style of the modal.
  72. | Type | Required | Platform |
  73. | ------------------------------------------------------------------------------------------------------- | -------- | -------- |
  74. | enum('formSheet', 'pageSheet', 'fullScreen', 'overFullScreen', 'overCurrentContext', 'popOver', 'none') | No | Both |
  75. #### Styles supported on both platforms
  76. - **overCurrentContext** - Display the modal and do not remove previous content when the show animation ends.
  77. - **none** - default system presentation style
  78. #### Styles supported only on iOS
  79. - **formSheet** - display content centered in the screen.
  80. - **pageSheet** - partially cover the underlying content.
  81. - **overFullScreen** - display the modal in full screen mode and do not remove previous content when the show animation ends.
  82. - **popOver** - Center content on screen and dim the content behind it.
  83. The default presentation style is different on each platform.
  84. | iOS | Android |
  85. | ---------------------------------------------------------------------------------------- | ------------ |
  86. | <ul><li>iOS 12 and below - `fullScreen`</li><li>iOS 13 and above - `pageSheet`</li></ul> | `fullScreen` |
  87. ## `modalTransitionStyle`
  88. Configure the transition style of the modal.
  89. | Type | Required | Platform |
  90. | ----------------------------------------------------------------------- | -------- | -------- |
  91. | enum('coverVertical', 'crossDissolve', 'flipHorizontal', 'partialCurl') | No | Both |
  92. ## `popGesture`
  93. Enable or disable swipe back to pop gesture.
  94. | Type | Required | Platform |
  95. | ------- | -------- | -------- |
  96. | boolean | No | iOS |
  97. ## `backgroundImage`
  98. Background image of the screen.
  99. | Type | Required | Platform |
  100. | ----- | -------- | -------- |
  101. | Image | No | iOS |
  102. ## `rootBackgroundImage`
  103. Background image for the Navigation View.
  104. | Type | Required | Platform |
  105. | ----- | -------- | -------- |
  106. | Image | No | Android |
  107. ## `blurOnUnmount`
  108. Enable or disable automaticall blur of the focused input, dismissing keyboard on unmount.
  109. | Type | Required | Platform | Default |
  110. | ------- | -------- | -------- | ------- |
  111. | boolean | No | Android | false |