You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/modal.md
+10-8
Original file line number
Diff line number
Diff line change
@@ -98,10 +98,8 @@ Here's a simplified example illustrating how a child component can interact with
98
98
import CanDismissChildStateExample from '@site/static/usage/v8/modal/can-dismiss/child-state/index.md';
99
99
100
100
<CanDismissChildStateExample />
101
-
102
-
## Types of modals
103
101
104
-
###Card Modal
102
+
## Card Modal
105
103
106
104
Developers can create a card modal effect where the modal appears as a card stacked on top of your app's main content. To create a card modal, developers need to set the `presentingElement` property on `ion-modal`.
107
105
@@ -117,10 +115,10 @@ import CardExample from '@site/static/usage/v8/modal/card/basic/index.md';
117
115
118
116
<CardExample />
119
117
120
-
###Sheet Modal
118
+
## Sheet Modal
121
119
122
120
:::info
123
-
[Content](./content)must be used inside of the sheet modal otherwise your modal content will not be scrollable.
121
+
[Content](./content)should be used inside of the sheet modal if you want your modal content to be scrollable.
124
122
:::
125
123
126
124
Developers can create a sheet modal effect similar to the drawer components available in maps applications. To create a sheet modal, developers need to set the `breakpoints` and `initialBreakpoint` properties on `ion-modal`.
@@ -135,19 +133,23 @@ import SheetExample from '@site/static/usage/v8/modal/sheet/basic/index.md';
135
133
136
134
<SheetExample />
137
135
138
-
####Interacting with background content
136
+
### Interacting with background content
139
137
140
138
import SheetBackgroundContentExample from '@site/static/usage/v8/modal/sheet/background-content/index.md';
141
139
142
140
<SheetBackgroundContentExample />
143
141
144
-
#### Auto Height Sheet
142
+
### Custom Sheet Height
143
+
144
+
Developers should use the `--height` CSS Variable to change the height of the sheet modal instead of changing the last breakpoint in the `breakpoints` array. The reason for this is changing the last breakpoint in the `breakpoints` array to a value less than `1` will cause some of the modal to be inaccessible outside of the viewport.
145
+
146
+
The following example shows how to get a sheet modal that is automatically sized based on its content. Note that by keeping the maximum breakpoint at `1` we ensure that the entire modal is accessible in the viewport.
145
147
146
148
import SheetAutoHeightExample from '@site/static/usage/v8/modal/sheet/auto-height/index.md';
147
149
148
150
<SheetAutoHeightExample />
149
151
150
-
####Handle Behavior
152
+
### Handle Behavior
151
153
152
154
Sheet modals can optionally render a handle indicator used for dragging the sheet between breakpoints. The `handleBehavior` property can be used to configure the behavior of when the handle is activated by the user.
Copy file name to clipboardExpand all lines: versioned_docs/version-v7/api/modal.md
+9-7
Original file line number
Diff line number
Diff line change
@@ -103,9 +103,7 @@ import CanDismissChildStateExample from '@site/static/usage/v7/modal/can-dismiss
103
103
104
104
<CanDismissChildStateExample />
105
105
106
-
## Types of modals
107
-
108
-
### Card Modal
106
+
## Card Modal
109
107
110
108
Developers can create a card modal effect where the modal appears as a card stacked on top of your app's main content. To create a card modal, developers need to set the `presentingElement` property on `ion-modal`.
111
109
@@ -121,7 +119,7 @@ import CardExample from '@site/static/usage/v7/modal/card/basic/index.md';
121
119
122
120
<CardExample />
123
121
124
-
###Sheet Modal
122
+
## Sheet Modal
125
123
126
124
:::info
127
125
[Content](./content) must be used inside of the sheet modal otherwise your modal content will not be scrollable.
@@ -139,19 +137,23 @@ import SheetExample from '@site/static/usage/v7/modal/sheet/basic/index.md';
139
137
140
138
<SheetExample />
141
139
142
-
####Interacting with background content
140
+
### Interacting with background content
143
141
144
142
import SheetBackgroundContentExample from '@site/static/usage/v7/modal/sheet/background-content/index.md';
145
143
146
144
<SheetBackgroundContentExample />
147
145
148
-
#### Auto Height Sheet
146
+
### Custom Sheet Height
147
+
148
+
Developers should use the `--height` CSS Variable to change the height of the sheet modal instead of changing the last breakpoint in the `breakpoints` array. The reason for this is changing the last breakpoint in the `breakpoints` array to a value less than `1` will cause some of the modal to be inaccessible outside of the viewport.
149
+
150
+
The following example shows how to get a sheet modal that is automatically sized based on its content. Note that by keeping the maximum breakpoint at `1` we ensure that the entire modal is accessible in the viewport.
149
151
150
152
import SheetAutoHeightExample from '@site/static/usage/v7/modal/sheet/auto-height/index.md';
151
153
152
154
<SheetAutoHeightExample />
153
155
154
-
####Handle Behavior
156
+
### Handle Behavior
155
157
156
158
Sheet modals can optionally render a handle indicator used for dragging the sheet between breakpoints. The `handleBehavior` property can be used to configure the behavior of when the handle is activated by the user.
0 commit comments