react-native-navigation的迁移库

options-root.mdx 5.4KB

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