react-native-navigation的迁移库

options-root.mdx 5.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  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. - **formSheet** - display content centered in the screen.
  81. - **pageSheet** - partially cover the underlying content.
  82. - **overFullScreen** - display the modal in full screen mode and do not remove previous content when the show animation ends.
  83. - **popOver** - Center content on screen and dim the content behind it.
  84. The default presentation style is different on each platform.
  85. | iOS | Android |
  86. | ---------------------------------------------------------------------------------------- | ------------ |
  87. | <ul><li>iOS 12 and below - `fullScreen`</li><li>iOS 13 and above - `pageSheet`</li></ul> | `fullScreen` |
  88. ## `modalTransitionStyle`
  89. Configure the transition style of the modal.
  90. | Type | Required | Platform |
  91. | ----------------------------------------------------------------------- | -------- | -------- |
  92. | enum('coverVertical', 'crossDissolve', 'flipHorizontal', 'partialCurl') | No | Both |
  93. ## `popGesture`
  94. Enable or disable swipe back to pop gesture.
  95. | Type | Required | Platform |
  96. | ------- | -------- | -------- |
  97. | boolean | No | iOS |
  98. ## `backgroundImage`
  99. Background image of the screen.
  100. | Type | Required | Platform |
  101. | ----- | -------- | -------- |
  102. | Image | No | iOS |
  103. ## `rootBackgroundImage`
  104. Background image for the Navigation View.
  105. | Type | Required | Platform |
  106. | ----- | -------- | -------- |
  107. | Image | No | Android |
  108. ## `blurOnUnmount`
  109. Enable or disable automaticall blur of the focused input, dismissing keyboard on unmount.
  110. | Type | Required | Platform | Default |
  111. | ------- | -------- | -------- | ------- |
  112. | boolean | No | Android | false |
  113. ## `navigationBar`
  114. Enable or disable automaticall blur of the focused input, dismissing keyboard on unmount.
  115. | Type | Required | Platform |
  116. | ------- | -------- | -------- |
  117. | boolean | No | Android |