diff --git a/docs/api/modal.md b/docs/api/modal.md index d8fb298ded3..1249e2a813b 100644 --- a/docs/api/modal.md +++ b/docs/api/modal.md @@ -157,6 +157,14 @@ import SheetHandleBehaviorExample from '@site/static/usage/v8/modal/sheet/handle +### Scrolling content at all breakpoints + +Sheet modals can be configured to allow scrolling content at all breakpoints, making them ideal for displaying content larger than the viewport. By setting the `expandToScroll` property to `false`, the content remains scrollable at every breakpoint. Otherwise, by default, scrolling is only enabled when the sheet modal is fully expanded. + +import SheetScrollingContentExample from '@site/static/usage/v8/modal/sheet/expand-to-scroll/index.md'; + + + ## Styling Modals are presented at the root of your application so they overlay your entire app. This behavior applies to both inline modals and modals presented from a controller. As a result, custom modal styles can not be scoped to a particular component as they will not apply to the modal. Instead, styles must be applied globally. For most developers, placing the custom styles in `global.css` is sufficient. diff --git a/static/usage/v8/modal/sheet/expand-to-scroll/angular/example_component_html.md b/static/usage/v8/modal/sheet/expand-to-scroll/angular/example_component_html.md new file mode 100644 index 00000000000..5357e9e82ef --- /dev/null +++ b/static/usage/v8/modal/sheet/expand-to-scroll/angular/example_component_html.md @@ -0,0 +1,165 @@ +```html + + + App + + + + Open Sheet Modal + + + + + + + + + + +

Connor Smith

+

Sales Rep

+
+
+ + + + + +

Jack Smith

+

Product Designer

+
+
+ + + + + +

Daniel Smith

+

Product Designer

+
+
+ + + + + +

Claire Smith

+

Graphic Designer

+
+
+ + + + + +

Kim Smith

+

Software Engineer

+
+
+ + + + + +

Alex Smith

+

Software Engineer

+
+
+ + + + + +

Eric Smith

+

Product Manager

+
+
+ + + + + +

Grace Smith

+

Product Manager

+
+
+ + + + + +

Henry Smith

+

Product Owner

+
+
+ + + + + +

Greg Smith

+

Director of Operations

+
+
+ + + + + +

Zoey Smith

+

CEO

+
+
+ + + + + +

Oliver Smith

+

COO

+
+
+ + + + + +

Emma Smith

+

CTO

+
+
+
+
+
+
+
+``` diff --git a/static/usage/v8/modal/sheet/expand-to-scroll/angular/example_component_ts.md b/static/usage/v8/modal/sheet/expand-to-scroll/angular/example_component_ts.md new file mode 100644 index 00000000000..c41fa70b4e3 --- /dev/null +++ b/static/usage/v8/modal/sheet/expand-to-scroll/angular/example_component_ts.md @@ -0,0 +1,36 @@ +```ts +import { Component } from '@angular/core'; +import { + IonAvatar, + IonButton, + IonContent, + IonHeader, + IonImg, + IonItem, + IonLabel, + IonList, + IonModal, + IonTitle, + IonToolbar, +} from '@ionic/angular/standalone'; + +@Component({ + selector: 'app-example', + templateUrl: 'example.component.html', + styleUrls: ['example.component.css'], + imports: [ + IonAvatar, + IonButton, + IonContent, + IonHeader, + IonImg, + IonItem, + IonLabel, + IonList, + IonModal, + IonTitle, + IonToolbar, + ], +}) +export class ExampleComponent {} +``` diff --git a/static/usage/v8/modal/sheet/expand-to-scroll/demo.html b/static/usage/v8/modal/sheet/expand-to-scroll/demo.html new file mode 100644 index 00000000000..79516adaef7 --- /dev/null +++ b/static/usage/v8/modal/sheet/expand-to-scroll/demo.html @@ -0,0 +1,179 @@ + + + + + + Modal | Sheet + + + + + + + + + + + App + + + + Open Sheet Modal + + + + + + + + + +

Connor Smith

+

Sales Rep

+
+
+ + + + + +

Jack Smith

+

Product Designer

+
+
+ + + + + +

Daniel Smith

+

Product Designer

+
+
+ + + + + +

Claire Smith

+

Graphic Designer

+
+
+ + + + + +

Kim Smith

+

Software Engineer

+
+
+ + + + + +

Alex Smith

+

Software Engineer

+
+
+ + + + + +

Eric Smith

+

Product Manager

+
+
+ + + + + +

Grace Smith

+

Product Manager

+
+
+ + + + + +

Henry Smith

+

Product Owner

+
+
+ + + + + +

Greg Smith

+

Director of Operations

+
+
+ + + + + +

Zoey Smith

+

CEO

+
+
+ + + + + +

Oliver Smith

+

COO

+
+
+ + + + + +

Emma Smith

+

CTO

+
+
+
+
+
+
+
+ + + + diff --git a/static/usage/v8/modal/sheet/expand-to-scroll/index.md b/static/usage/v8/modal/sheet/expand-to-scroll/index.md new file mode 100644 index 00000000000..f656ead1a57 --- /dev/null +++ b/static/usage/v8/modal/sheet/expand-to-scroll/index.md @@ -0,0 +1,26 @@ +import Playground from '@site/src/components/global/Playground'; + +import javascript from './javascript.md'; +import react from './react.md'; +import vue from './vue.md'; + +import angular_example_component_html from './angular/example_component_html.md'; +import angular_example_component_ts from './angular/example_component_ts.md'; + + diff --git a/static/usage/v8/modal/sheet/expand-to-scroll/javascript.md b/static/usage/v8/modal/sheet/expand-to-scroll/javascript.md new file mode 100644 index 00000000000..b4f04b5a634 --- /dev/null +++ b/static/usage/v8/modal/sheet/expand-to-scroll/javascript.md @@ -0,0 +1,140 @@ +```html + + + App + + + + Open Sheet Modal + + + + + + + + + +

Connor Smith

+

Sales Rep

+
+
+ + + + + +

Jack Smith

+

Product Designer

+
+
+ + + + + +

Daniel Smith

+

Product Designer

+
+
+ + + + + +

Claire Smith

+

Graphic Designer

+
+
+ + + + + +

Kim Smith

+

Software Engineer

+
+
+ + + + + +

Alex Smith

+

Software Engineer

+
+
+ + + + + +

Eric Smith

+

Product Manager

+
+
+ + + + + +

Grace Smith

+

Product Manager

+
+
+ + + + + +

Henry Smith

+

Product Owner

+
+
+ + + + + +

Greg Smith

+

Director of Operations

+
+
+ + + + + +

Zoey Smith

+

CEO

+
+
+ + + + + +

Oliver Smith

+

COO

+
+
+ + + + + +

Emma Smith

+

CTO

+
+
+
+
+
+
+ + +``` diff --git a/static/usage/v8/modal/sheet/expand-to-scroll/react.md b/static/usage/v8/modal/sheet/expand-to-scroll/react.md new file mode 100644 index 00000000000..e6afd40b516 --- /dev/null +++ b/static/usage/v8/modal/sheet/expand-to-scroll/react.md @@ -0,0 +1,185 @@ +```tsx +import React from 'react'; +import { + IonButton, + IonModal, + IonHeader, + IonContent, + IonToolbar, + IonTitle, + IonPage, + IonList, + IonItem, + IonLabel, + IonAvatar, + IonImg, +} from '@ionic/react'; + +function Example() { + return ( + + + + App + + + + + Open Sheet Modal + + + + + + + + + +

Connor Smith

+

Sales Rep

+
+
+ + + + + +

Jack Smith

+

Product Designer

+
+
+ + + + + +

Daniel Smith

+

Product Designer

+
+
+ + + + + +

Claire Smith

+

Graphic Designer

+
+
+ + + + + +

Kim Smith

+

Software Engineer

+
+
+ + + + + +

Alex Smith

+

Software Engineer

+
+
+ + + + + +

Eric Smith

+

Product Manager

+
+
+ + + + + +

Grace Smith

+

Product Manager

+
+
+ + + + + +

Henry Smith

+

Product Owner

+
+
+ + + + + +

Greg Smith

+

Director of Operations

+
+
+ + + + + +

Zoey Smith

+

CEO

+
+
+ + + + + +

Oliver Smith

+

COO

+
+
+ + + + + +

Emma Smith

+

CTO

+
+
+
+
+
+
+
+ ); +} + +export default Example; +``` diff --git a/static/usage/v8/modal/sheet/expand-to-scroll/vue.md b/static/usage/v8/modal/sheet/expand-to-scroll/vue.md new file mode 100644 index 00000000000..57526a20fed --- /dev/null +++ b/static/usage/v8/modal/sheet/expand-to-scroll/vue.md @@ -0,0 +1,181 @@ +```html + + + +```