{"id":3983,"date":"2021-12-14T16:58:06","date_gmt":"2021-12-14T16:58:06","guid":{"rendered":"https:\/\/ionicframework.com\/blog\/?p=3983"},"modified":"2021-12-15T00:54:19","modified_gmt":"2021-12-15T00:54:19","slug":"5-examples-of-the-new-ionic-6-bottom-sheet-modal","status":"publish","type":"post","link":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal","title":{"rendered":"5 Examples of the new Ionic 6 Bottom Sheet Modal"},"content":{"rendered":"<blockquote><p>\n  This is a guest post from Simon Grimm, Ionic Insider and educator at <a href=\"https:\/\/ionicacademy.com\/\">the Ionic Academy<\/a>. Simon just released a brand new eBook called <a href=\"https:\/\/builtwithionic.com\/\">Built with Ionic<\/a> where he breaks down popular apps like Netflix and rebuilds them completely with Ionic styling and interactions!\n<\/p><\/blockquote>\n<p>The Ionic 6 modal comes with a brand new presentation mode called <strong>bottom sheet<\/strong>, which is usually also known as <em>bottom drawer<\/em> in mobile applications.<\/p>\n<p>It is the third presentation style besides the default full screen modal and the iOS card modal, and in this tutorial we will explore five ways to use the new presentation.<\/p>\n<p><!--more--><\/p>\n<h2>Ionic App Prerequisite<\/h2>\n<p>All you need to check out the following examples is a blank Ionic app, so go ahead and create a new app if you need one for testing:<\/p>\n<pre><code class=\"language-sh\">ionic start bottomModal blank --type=angular\n<\/code><\/pre>\n<p>If you use your own project, make sure your app is using Ionic 6 by running the following command and then checking your <strong>package.json<\/strong> afterwards:<\/p>\n<pre><code class=\"language-sh\">npm i @ionic\/angular@latest\n<\/code><\/pre>\n<p><strong>Note:<\/strong> Make sure your project is under source control before you migrate to a major new version and check out the <a href=\"https:\/\/github.com\/ionic-team\/ionic-framework\/blob\/next\/BREAKING.md#version-6x\">breaking changes of v6<\/a> or follow the <a href=\"https:\/\/github.com\/ionic-team\/ionic-framework\/blob\/next\/BETA.md\">v6 upgrade guide<\/a> for information about React and Vue as well.<\/p>\n<h2>1. Ionic Bottom Sheet Modal Basic<\/h2>\n<p>Let&#8217;s start with the basics &#8211; <em>how can I get a bottom sheet modal?<\/em><\/p>\n<p><img decoding=\"async\" data-src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif?1\" alt=\"\" class=\"alignnone lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 408px; --smush-placeholder-aspect-ratio: 408\/793;\" \/><noscript><img decoding=\"async\" src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif?1\" alt=\"\" class=\"alignnone\" \/><\/noscript><\/p>\n<p>For this simple case we generate a new page that will act as our content:<\/p>\n<pre><code class=\"language-sh\">ionic g page simpleModal\n<\/code><\/pre>\n<p>You could leave that page empty or put in a bit of dummy content, it won&#8217;t change the presentation logic.<\/p>\n<p>Anyway, if you want to see some elements on the screen, quickly bring up the <strong>src\/app\/simple-modal\/simple-modal.page.html<\/strong> and change it to:<\/p>\n<pre><code class=\"language-html\">&lt;ion-header&gt;\n  &lt;ion-toolbar&gt;\n    &lt;ion-title&gt;Modal Content&lt;\/ion-title&gt;\n  &lt;\/ion-toolbar&gt;\n&lt;\/ion-header&gt;\n\n&lt;ion-content&gt;\n\n  &lt;ion-accordion-group&gt;\n    &lt;ion-accordion&gt;\n      &lt;ion-item slot=&quot;header&quot;&gt;\n        &lt;ion-label&gt;People&lt;\/ion-label&gt;\n      &lt;\/ion-item&gt;\n\n      &lt;ion-list slot=&quot;content&quot;&gt;\n        &lt;ion-item&gt;\n          &lt;ion-label&gt;Max&lt;\/ion-label&gt;\n        &lt;\/ion-item&gt;\n        &lt;ion-item&gt;\n          &lt;ion-label&gt;Mike&lt;\/ion-label&gt;\n        &lt;\/ion-item&gt;\n        &lt;ion-item&gt;\n          &lt;ion-label&gt;Kim&lt;\/ion-label&gt;\n        &lt;\/ion-item&gt;\n      &lt;\/ion-list&gt;\n    &lt;\/ion-accordion&gt;\n\n  &lt;\/ion-accordion-group&gt;\n\n&lt;\/ion-content&gt;\n<\/code><\/pre>\n<blockquote><p>\n  Oh, you never saw the <code>ion-accordion-group<\/code> before? Another new component of Ionic 6, and we will talk about that in another dedicated post!\n<\/p><\/blockquote>\n<p>For now we need to focus on the presentation of the modal, and to get the bottom sheet you have to set the <code>breakpoints<\/code> and <code>initialBreakpoints<\/code> value when creating the modal.<\/p>\n<p>Let&#8217;s do this right now by changing the <strong>src\/app\/home\/home.page.ts<\/strong> to:<\/p>\n<pre><code class=\"language-ts\">import { Component } from &#039;@angular\/core&#039;;\nimport { ModalController } from &#039;@ionic\/angular&#039;;\nimport { SimpleModalPage } from &#039;..\/simple-modal\/simple-modal.page&#039;;\n\n@Component({\n  selector: &#039;app-home&#039;,\n  templateUrl: &#039;home.page.html&#039;,\n  styleUrls: [&#039;home.page.scss&#039;],\n})\nexport class HomePage {\n\n  constructor(private modalCtrl: ModalController) {}\n\n  async presentModal() {\n    const modal = await this.modalCtrl.create({\n      component: SimpleModalPage,\n      breakpoints: [0, 0.3, 0.5, 0.8],\n      initialBreakpoint: 0.5\n    });\n    await modal.present();\n  }\n}\n<\/code><\/pre>\n<p>The <code>breakpoints<\/code> value is an array of values between 0 and 1, and defines at which percentage of your screen the modal <strong>snaps<\/strong> when the user drags it.<\/p>\n<p>When the modal comes up, it will open initially to the <code>initialBreakpoint<\/code>, which needs to be one value that you&#8217;ve added to the array of <code>breakpoints<\/code>.<\/p>\n<p>It&#8217;s really that easy, and you might already have tons of ideas to use this new modal. Let&#8217;s take a look at another helpful example.<\/p>\n<h2>2. Pass Data to your Modal with Background Update<\/h2>\n<p>Because the bottom sheet usually doesn&#8217;t cover your whole screen, reacting to changes made in the modal becomes more important.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"962\" data-src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-2.gif\" alt=\"\" class=\"alignnone size-full wp-image-3987 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 495px; --smush-placeholder-aspect-ratio: 495\/962;\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"962\" src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-2.gif\" alt=\"\" class=\"alignnone size-full wp-image-3987\" \/><\/noscript><\/p>\n<p>But there&#8217;s an easy solution to keep an <strong>active link<\/strong> between your page and the modal, and we will do this within another new page:<\/p>\n<pre><code class=\"language-sh\">ionic g page updateModal\n<\/code><\/pre>\n<p>The idea is quite easy: We pass a <code>BehaviorSubject<\/code> into the <code>componentProps<\/code> of the modal just like we would pass any other input.<\/p>\n<p>By doing this, we can <code>subscribe()<\/code> to the changes on our page and later emit new values within the modal!<\/p>\n<blockquote><p>\n  I&#8217;ve used this pattern inside my new eBook <a href=\"https:\/\/builtwithionic.com\/\">Built with Ionic<\/a> &#8211; check it out if you want to build even more epic interfaces with Animations and Gestures!\n<\/p><\/blockquote>\n<p>Imagine you want to display a selection of the payment method, which could be easily handled with the bottom sheet.<\/p>\n<p>We can start by presenting the modal with the Subject inside the <strong>src\/app\/home\/home.page.ts<\/strong>:<\/p>\n<pre><code class=\"language-ts\">import { Component } from &#039;@angular\/core&#039;;\nimport { ModalController } from &#039;@ionic\/angular&#039;;\nimport { BehaviorSubject } from &#039;rxjs&#039;;\nimport { UpdateModalPage } from &#039;..\/update-modal\/update-modal.page&#039;;\n\n@Component({\n  selector: &#039;app-home&#039;,\n  templateUrl: &#039;home.page.html&#039;,\n  styleUrls: [&#039;home.page.scss&#039;],\n})\nexport class HomePage {\n  choice = &#039;Credit Card&#039;;\n\n  constructor(private modalCtrl: ModalController) {}\n\n  async presentModal() {\n    const mySubject = new BehaviorSubject(this.choice);\n\n    const modal = await this.modalCtrl.create({\n      component: UpdateModalPage,\n      breakpoints: [0, 0.2],\n      initialBreakpoint: 0.2,\n      handle: false,\n      componentProps: {\n        mySubject\n      },\n    });\n    await modal.present();\n\n    mySubject.subscribe((value: string) =&gt; {\n      this.choice = value;\n    });\n\n    modal.onDidDismiss().then((_ =&gt; {\n      mySubject.unsubscribe();\n    }));\n  }\n}\n<\/code><\/pre>\n<p>Of course we also <code>unsubscribe()<\/code> when the modal is dismissed to prevent memory leaks!<\/p>\n<p>Now we can change the <strong>src\/app\/home\/home.page.html<\/strong> so we can see our choice in the background of the main page:<\/p>\n<pre><code class=\"language-html\">&lt;ion-header&gt;\n  &lt;ion-toolbar color=&quot;primary&quot;&gt;\n    &lt;ion-title&gt;\n      Ionic Modal\n    &lt;\/ion-title&gt;\n  &lt;\/ion-toolbar&gt;\n&lt;\/ion-header&gt;\n\n&lt;ion-content class=&quot;ion-padding&quot;&gt;\n  &lt;ion-text color=&quot;tertiary&quot; class=&quot;ion-text-center&quot;&gt;\n    &lt;h2&gt;Your choice: {{ choice }}&lt;\/h2&gt;\n  &lt;\/ion-text&gt;\n  &lt;ion-button expand=&quot;full&quot; (click)=&quot;presentModal()&quot;&gt;Show modal&lt;\/ion-button&gt;\n&lt;\/ion-content&gt;\n<\/code><\/pre>\n<p>Next step is defining the <code>@Input()<\/code> in our modal page, and a bit of additional logic so we can switch between different values on that page.<\/p>\n<p>To build a simple UI we not only need the string value but also a number to handle the change more easily (<em>and use some conditional styling<\/em>), so go ahead and change the <strong>src\/app\/update-modal\/update-modal.page.ts<\/strong> to this:<\/p>\n<pre><code class=\"language-ts\">import { Component, Input, OnInit } from &#039;@angular\/core&#039;;\nimport { ModalController } from &#039;@ionic\/angular&#039;;\nimport { BehaviorSubject } from &#039;rxjs&#039;;\n\n@Component({\n  selector: &#039;app-update-modal&#039;,\n  templateUrl: &#039;.\/update-modal.page.html&#039;,\n  styleUrls: [&#039;.\/update-modal.page.scss&#039;],\n})\nexport class UpdateModalPage implements OnInit {\n  choice = 0;\n  @Input() mySubject: BehaviorSubject&lt;string&gt;;\n  choices = [\n    &#039;Credit Card&#039;,\n    &#039;Paypal&#039;,\n    &#039;Bank transfer&#039;\n  ];\n\n  constructor(private modalCtrl: ModalController) { }\n\n  \/\/ Set the initial choice based on the input\n  ngOnInit() {\n    const preselect = this.mySubject.value;    \n    this.choice = this.choices.indexOf(preselect);\n  }\n\n  \/\/ Change the choice and update the Subject\n  changeChoice(num) {\n    this.choice = num;\n    this.mySubject.next(this.choices[num]);\n  }\n\n  close() {\n    this.modalCtrl.dismiss();\n  }\n}\n<\/code><\/pre>\n<p>We now have the current selection as a number inside <code>choice<\/code>, so we can build simple logic with three buttons and conditional styling around it within our <strong>src\/app\/update-modal\/update-modal.page.html<\/strong>:<\/p>\n<pre><code class=\"language-html\">&lt;ion-content&gt;\n  &lt;ion-row&gt;\n    &lt;ion-col size=&quot;12&quot; class=&quot;ion-text-center&quot; class=&quot;category-select&quot;&gt;\n      &lt;ion-button size=&quot;small&quot; shape=&quot;round&quot; (click)=&quot;changeChoice(0)&quot; [class.selected]=&quot;choice == 0&quot;&gt;\n        Credit Card\n      &lt;\/ion-button&gt;\n      &lt;ion-button size=&quot;small&quot; shape=&quot;round&quot; (click)=&quot;changeChoice(1)&quot; [class.selected]=&quot;choice == 1&quot;&gt;\n        Paypal\n      &lt;\/ion-button&gt;\n      &lt;ion-button size=&quot;small&quot; shape=&quot;round&quot; (click)=&quot;changeChoice(2)&quot; [class.selected]=&quot;choice == 2&quot;&gt;\n        Bank transfer\n      &lt;\/ion-button&gt;\n    &lt;\/ion-col&gt;\n  &lt;\/ion-row&gt;\n\n  &lt;ion-button expand=&quot;block&quot; color=&quot;primary&quot; strong=&quot;true&quot; (click)=&quot;close()&quot; class=&quot;ion-margin-top&quot;&gt;\n    Confirm\n  &lt;\/ion-button&gt;\n&lt;\/ion-content&gt;\n<\/code><\/pre>\n<p>Every button will now select a different value, and the <code>changeChoice()<\/code> function will update the subject &#8211; the parent immediately gets the new choice!<\/p>\n<p>To make the selection look more pretty you can add some easy CSS inside the <strong>src\/app\/update-modal\/update-modal.page.scss<\/strong> like this:<\/p>\n<pre><code class=\"language-css\">.category-select {\n  ion-button {\n    color: var(--ion-color-primary);\n    --background: transparent;\n    --background-activated: var(--ion-color-primary);\n  }\n\n  .selected {\n    font-weight: 600;\n    color: #fff;\n    --background: var(--ion-color-primary);\n  }\n}\n<\/code><\/pre>\n<p>Selecting a new payment method was never more fun!<\/p>\n<p>Of course this was just the most basic example, but presenting small overlays like this for a quick selection can really unclutter the rest of your form or overall UI!<\/p>\n<p>Speaking of simplifying things&#8230;<\/p>\n<h2>3. Using an Inline Modal<\/h2>\n<p>Ever think  you just need a simple modal and don&#8217;t want the usual way by creating another page, importing it, putting in your styling&#8230;?<\/p>\n<p>Turns out that&#8217;s easier than ever by directly using a modal inline and adding a <strong>trigger<\/strong>!<\/p>\n<p>The only thing we actually need is a piece of HTML that defines an <code>id<\/code> like the <code>ion-button<\/code> below.<\/p>\n<p>Now we can set the <code>trigger<\/code> on the modal to the same value and boom &#8211; clicking the trigger brings up the modal.<\/p>\n<p>Go ahead and change the <strong>src\/app\/home\/home.page.html<\/strong> to this:<\/p>\n<pre><code class=\"language-html\">&lt;ion-header&gt;\n  &lt;ion-toolbar color=&quot;primary&quot;&gt;\n    &lt;ion-title&gt;\n      Ionic Modal\n    &lt;\/ion-title&gt;\n  &lt;\/ion-toolbar&gt;\n&lt;\/ion-header&gt;\n\n&lt;ion-content class=&quot;ion-padding&quot;&gt;\n\n  &lt;ion-button expand=&quot;full&quot; id=&quot;openModal&quot;&gt;\n    I open the modal\n  &lt;\/ion-button&gt;\n\n  &lt;ion-modal trigger=&quot;openModal&quot; [initialBreakpoint]=&quot;0.5&quot; [breakpoints]=&quot;[0, 0.5, 1]&quot;&gt;\n    &lt;ng-template&gt;\n      &lt;ion-header&gt;\n        &lt;ion-toolbar color=&quot;primary&quot;&gt;\n          &lt;ion-title&gt;\n            Inline\n          &lt;\/ion-title&gt;\n        &lt;\/ion-toolbar&gt;\n      &lt;\/ion-header&gt;\n      &lt;ion-content&gt;\n        &lt;ion-item&gt;\n          This is so cool!\n          &lt;p&gt;And a bit funny&lt;\/p&gt;\n        &lt;\/ion-item&gt;\n      &lt;\/ion-content&gt;\n    &lt;\/ng-template&gt;\n  &lt;\/ion-modal&gt;\n\n&lt;\/ion-content&gt;\n<\/code><\/pre>\n<p>See how we can even inject our <code>breakpoints<\/code> and <code>initialBreakpoint<\/code>?<\/p>\n<p>This is a super convenient way if you need a simple modal and not the overhead of adding another page to your project.<\/p>\n<h2>4. Use the Modal as a Toast<\/h2>\n<p>Having scrollable content inside the modal is pretty cool, but have you thought about using it for a toast-like presentation of some information?<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"527\" height=\"1024\" data-src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-3-527x1024.gif\" alt=\"\" class=\"alignnone size-large wp-image-3988 lazyload\" data-srcset=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-3-527x1024.gif 527w, https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-3-154x300.gif 154w\" data-sizes=\"auto, (max-width: 527px) 100vw, 527px\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 527px; --smush-placeholder-aspect-ratio: 527\/1024;\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"527\" height=\"1024\" src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-3-527x1024.gif\" alt=\"\" class=\"alignnone size-large wp-image-3988\" srcset=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-3-527x1024.gif 527w, https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-3-154x300.gif 154w\" sizes=\"auto, (max-width: 527px) 100vw, 527px\" \/><\/noscript><\/p>\n<p>You can certainly do it with just a bit of additional styling!<\/p>\n<p>Again, let&#8217;s generate a new page first:<\/p>\n<pre><code class=\"language-sh\">ionic g page toastModal\n<\/code><\/pre>\n<p>The creation of the modal is mostly the same, but this time we also set the <code>handle<\/code> property to false so we get rid of that little grey notch at the top, and we also define a custom <code>cssClass<\/code>.<\/p>\n<p>On top of that we use <code>setTimeout()<\/code> to directly hide the <em>todal<\/em> (leave a comment with a better name for this!) again, so let&#8217;s change the <strong>src\/app\/home\/home.page.ts<\/strong> to this now:<\/p>\n<pre><code class=\"language-ts\">import { Component } from &#039;@angular\/core&#039;;\nimport { ModalController } from &#039;@ionic\/angular&#039;;\nimport { ToastModalPage } from &#039;..\/toast-modal\/toast-modal.page&#039;;\n\n@Component({\n  selector: &#039;app-home&#039;,\n  templateUrl: &#039;home.page.html&#039;,\n  styleUrls: [&#039;home.page.scss&#039;],\n})\nexport class HomePage {\n\n  constructor(private modalCtrl: ModalController) { }\n\n  async presentModal() {\n    const modal = await this.modalCtrl.create({\n      component: ToastModalPage,\n      breakpoints: [0, 0.3],\n      initialBreakpoint: 0.3,\n      cssClass: &#039;custom-modal&#039;,\n      handle: false\n    });\n    await modal.present();\n\n    \/\/ Optional: Hide the modal after a duration!\n    setTimeout(() =&gt; {\n      modal.dismiss();\n    }, 2000);\n  }\n\n}\n<\/code><\/pre>\n<p>For the content itself we need to be careful now, as we don&#8217;t really want a scrollable area and also need a transparent background to make it look better.<\/p>\n<p>Therefore we just wrap the content in our <strong>src\/app\/toast-modal\/toast-modal.page.html<\/strong> within a simple <code>div<\/code> and replace everything inside the file with:<\/p>\n<pre><code class=\"language-html\">&lt;div class=&quot;ion-padding ion-text-center content&quot;&gt;\n\n  &lt;ion-text color=&quot;primary&quot;&gt;\n    &lt;h2&gt;Great success!&lt;\/h2&gt;\n  &lt;\/ion-text&gt;\n  &lt;ion-icon name=&quot;checkmark-done-circle-outline&quot; size=&quot;large&quot; color=&quot;success&quot;&gt;&lt;\/ion-icon&gt;\n\n&lt;\/div&gt;\n<\/code><\/pre>\n<p>To make our element stand out with some background, we can add the following as a simple box styling to the <strong>src\/app\/toast-modal\/toast-modal.page.scss<\/strong>:<\/p>\n<pre><code class=\"language-css\">.content {\n    background: #fff;\n    margin: 20px;\n    border-radius: 8px;\n}\n<\/code><\/pre>\n<p>You&#8217;ll notice that at this point your modal is still taking up the full width. In fact it&#8217;s actually just the background color of the modal.<\/p>\n<p>Good thing we added a custom CSS class when we created the modal, so now we can style the modal at the top of our application inside the <strong>src\/global.scss<\/strong>:<\/p>\n<pre><code class=\"language-css\">.custom-modal {\n    --background: transparent;\n}\n<\/code><\/pre>\n<p>Now the modal has no background anymore, and since our simple box has <code>margin<\/code> it looks like it&#8217;s floating in the air.<\/p>\n<p>Of course, a super simple toast like this could be created with the <a href=\"https:\/\/ionicframework.com\/docs\/api\/toast\">Ionic Toast<\/a> as well, but when you think about adding some buttons or a bit more functionality, this alternative to a standard toast will suit you a lot better!<\/p>\n<h2>5. Custom Styling with Parts<\/h2>\n<p>We&#8217;ve scratched the surface of styling in the previous example, but let&#8217;s see exactly how to <strong>customize every piece of the bottom sheet modal<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"528\" height=\"1024\" data-src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4-528x1024.png\" alt=\"Bottom Sheet customization\" class=\"alignnone size-large wp-image-3989 lazyload\" data-srcset=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4-528x1024.png 528w, https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4-155x300.png 155w, https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4-768x1489.png 768w, https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4.png 788w\" data-sizes=\"auto, (max-width: 528px) 100vw, 528px\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 528px; --smush-placeholder-aspect-ratio: 528\/1024;\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"528\" height=\"1024\" src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4-528x1024.png\" alt=\"Bottom Sheet customization\" class=\"alignnone size-large wp-image-3989\" srcset=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4-528x1024.png 528w, https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4-155x300.png 155w, https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4-768x1489.png 768w, https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-4.png 788w\" sizes=\"auto, (max-width: 528px) 100vw, 528px\" \/><\/noscript><\/p>\n<p>Again, it&#8217;s important to add your custom CSS class to the creation for this, so one last time change the <strong>src\/app\/home\/home.page.ts<\/strong> to reuse our initial page:<\/p>\n<pre><code class=\"language-ts\">import { Component } from &#039;@angular\/core&#039;;\nimport { ModalController } from &#039;@ionic\/angular&#039;;\nimport { SimpleModalPage } from &#039;..\/simple-modal\/simple-modal.page&#039;;\n\n@Component({\n  selector: &#039;app-home&#039;,\n  templateUrl: &#039;home.page.html&#039;,\n  styleUrls: [&#039;home.page.scss&#039;],\n})\nexport class HomePage {\n\n  constructor(private modalCtrl: ModalController) { }\n\n  async presentModal() {\n    const modal = await this.modalCtrl.create({\n      component: SimpleModalPage,\n      breakpoints: [0, 0.4, 1],\n      initialBreakpoint: 0.4,\n      cssClass: &#039;custom-modal&#039;\n    });\n    await modal.present();\n  }\n\n}\n<\/code><\/pre>\n<p>Now you can theme your modal with different <a href=\"https:\/\/ionicframework.com\/docs\/api\/modal#css-custom-properties\">CSS properties<\/a>, but to get full control you have to use the <a href=\"https:\/\/ionicframework.com\/docs\/api\/modal#css-shadow-parts\">documented shadow parts<\/a>!<\/p>\n<p>If you have never used parts make sure to check out the <a href=\"https:\/\/ionicframework.com\/blog\/customize-your-ionic-framework-app-with-css-shadow-parts\/\">introduction to CSS Shadow Parts<\/a> from Brandy as well!<\/p>\n<p>The TL;DR version is this: You usually can&#8217;t style a shadow component from the outside and only inject styling through the CSS variables that Ionic offers for every component.<\/p>\n<p>However, if a part is declared within a component, you can directly target that element even if it&#8217;s within the Shadow DOM and inject your own styling!<\/p>\n<p>This means for our modal we can use these three available parts:<\/p>\n<ul>\n<li><code>backdrop<\/code>: The darkish backdrop that covers the rest of your app<\/li>\n<li><code>handle<\/code>: The top notch that is added at the top of the modal when using the bottom sheet presentation<\/li>\n<li><code>content<\/code>: The actual content of the modal, the page you display<\/li>\n<\/ul>\n<p>So let&#8217;s have some fun with all of these properties and change the <strong>src\/global.scss<\/strong> to:<\/p>\n<pre><code class=\"language-css\">.custom-modal {\n    --backdrop-opacity: 1;\n    backdrop-filter: blur(3px);\n\n    &amp;::part(backdrop) {\n        background: #000;\n    }\n\n    &amp;::part(handle) {\n        background: var(--ion-color-primary);\n        width: 150px;\n        height: 6px;\n    }\n\n    &amp;::part(content) {\n        border-radius: 0px;\n        box-shadow: 0px 0px 20px 5px rgb(0 0 0 \/ 32%);\n    }\n}\n<\/code><\/pre>\n<p>We now got a blurry transparent background, a bigger notch and a modal with drop shadow and no borders!<\/p>\n<p>Perhaps not the final styling you want to use in your own app, but it definitely shows that <strong>you can customize every property of the Ionic modal<\/strong>!<\/p>\n<h2>Future: Handle Drag Events<\/h2>\n<p>Initially I also wanted to build out something even more powerful in combination with <a href=\"https:\/\/ionicframework.com\/blog\/building-interactive-ionic-apps-with-gestures-and-animations\/\">Ionic animations<\/a>, but as of now it&#8217;s not possible to listen to changes of the modal breakpoints \/ position.<\/p>\n<p>This is an <a href=\"https:\/\/github.com\/ionic-team\/ionic-framework\/issues\/23955\">open issue<\/a> that we might see implemented in the near future, which would allow us to build even more powerful animations in combination with the modal.<\/p>\n<p>For example, take a look at the Google Maps application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"902\" data-src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-5.gif\" alt=\"\" class=\"alignnone size-full wp-image-3990 lazyload\" src=\"data:image\/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" style=\"--smush-placeholder-width: 464px; --smush-placeholder-aspect-ratio: 464\/902;\" \/><noscript><img loading=\"lazy\" decoding=\"async\" width=\"464\" height=\"902\" src=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-5.gif\" alt=\"\" class=\"alignnone size-full wp-image-3990\" \/><\/noscript><\/p>\n<p>When you select a location and pull up the bottom sheet, at some point the header search bar disappears. I&#8217;m very confident that we can (<em>and will..<\/em>) build this with Ionic soon!<\/p>\n<p>It&#8217;s like the icing on the cake, and I&#8217;m pretty sure we&#8217;ll have a lot of fun with this component in the future.<\/p>\n<h2>Make it Yours<\/h2>\n<p>These were just five examples of how you could integrate the new Ionic 6 bottom sheet presentation of a modal &#8211; what will you use it for?<\/p>\n<p>Leave a comment with more ideas on how you&#8217;ll use this component to improve your Ionic apps, and of course make sure you update your apps to Ionic 6 as soon as possible to benefit from all the new components!<\/p>\n<p>For everyone who wants learn Ionic faster, I\u2019m also running a full online school with 70+ Ionic video courses, templates and a supportive community \u2014 go <a href=\"https:\/\/ionicacademy.com\/\">check out the Ionic Academy<\/a> and get access to a ton of learning material and build epic Ionic apps.<\/p>\n<p>I have also released a new book, <a href=\"https:\/\/builtwithionic.com\/\">&#8220;Built WIth Ionic&#8221;<\/a>, all based on Ionic V6. For the launch week there&#8217;s a 20% discount on all packages. The offer ends December 17th!<\/p>\n<p>PS: And don\u2019t forget to <a href=\"https:\/\/www.youtube.com\/user\/saimon1924\">subscribe to my YouTube channel<\/a> for fresh Ionic tutorials every week!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is a guest post from Simon Grimm, Ionic Insider and educator at the Ionic Academy. Simon just released a brand new eBook called Built with Ionic where he breaks down popular apps like Netflix and rebuilds them completely with Ionic styling and interactions! The Ionic 6 modal comes with a brand new presentation mode [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"publish_to_discourse":"0","publish_post_category":"23","wpdc_auto_publish_overridden":"","wpdc_topic_tags":"","wpdc_pin_topic":"","wpdc_pin_until":"","discourse_post_id":"538573","discourse_permalink":"https:\/\/forum.ionicframework.com\/t\/5-examples-of-the-new-ionic-6-bottom-sheet-modal\/218393","wpdc_publishing_response":"","wpdc_publishing_error":"","_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[124],"tags":[60,3],"class_list":["post-3983","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-angular","tag-ionic"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.0 (Yoast SEO v23.0) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>5 Examples of the new Ionic 6 Bottom Sheet Modal - Ionic Blog<\/title>\n<meta name=\"description\" content=\"Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"5 Examples of the new Ionic 6 Bottom Sheet Modal\" \/>\n<meta property=\"og:description\" content=\"Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal\" \/>\n<meta property=\"og:site_name\" content=\"Ionic Blog\" \/>\n<meta property=\"article:published_time\" content=\"2021-12-14T16:58:06+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-15T00:54:19+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1920\" \/>\n\t<meta property=\"og:image:height\" content=\"854\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Simon Grimm\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\" \/>\n<meta name=\"twitter:creator\" content=\"@schlimmson\" \/>\n<meta name=\"twitter:site\" content=\"@ionicframework\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Simon Grimm\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#article\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal\"},\"author\":{\"name\":\"Simon Grimm\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/24d44b251756bd6488dcb741eec0bef6\"},\"headline\":\"5 Examples of the new Ionic 6 Bottom Sheet Modal\",\"datePublished\":\"2021-12-14T16:58:06+00:00\",\"dateModified\":\"2021-12-15T00:54:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal\"},\"wordCount\":1841,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif?1\",\"keywords\":[\"Angular\",\"Ionic\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal\",\"url\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal\",\"name\":\"5 Examples of the new Ionic 6 Bottom Sheet Modal - Ionic Blog\",\"isPartOf\":{\"@id\":\"https:\/\/ionic.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif?1\",\"datePublished\":\"2021-12-14T16:58:06+00:00\",\"dateModified\":\"2021-12-15T00:54:19+00:00\",\"description\":\"Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.\",\"breadcrumb\":{\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#primaryimage\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif\",\"width\":408,\"height\":793},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/ionic.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"5 Examples of the new Ionic 6 Bottom Sheet Modal\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ionic.io\/blog\/#website\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"name\":\"ionic.io\/blog\",\"description\":\"Build amazing native and progressive web apps with the web\",\"publisher\":{\"@id\":\"https:\/\/ionic.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ionic.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ionic.io\/blog\/#organization\",\"name\":\"Ionic\",\"url\":\"https:\/\/ionic.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png\",\"width\":1920,\"height\":854,\"caption\":\"Ionic\"},\"image\":{\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/ionicframework\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/24d44b251756bd6488dcb741eec0bef6\",\"name\":\"Simon Grimm\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/08\/simon-150x150.jpg\",\"contentUrl\":\"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/08\/simon-150x150.jpg\",\"caption\":\"Simon Grimm\"},\"sameAs\":[\"https:\/\/x.com\/schlimmson\"],\"url\":\"https:\/\/ionic.io\/blog\/author\/schlimmson\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"5 Examples of the new Ionic 6 Bottom Sheet Modal - Ionic Blog","description":"Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal","og_locale":"en_US","og_type":"article","og_title":"5 Examples of the new Ionic 6 Bottom Sheet Modal","og_description":"Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.","og_url":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal","og_site_name":"Ionic Blog","article_published_time":"2021-12-14T16:58:06+00:00","article_modified_time":"2021-12-15T00:54:19+00:00","og_image":[{"width":1920,"height":854,"url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","type":"image\/png"}],"author":"Simon Grimm","twitter_card":"summary_large_image","twitter_image":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","twitter_creator":"@schlimmson","twitter_site":"@ionicframework","twitter_misc":{"Written by":"Simon Grimm","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#article","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal"},"author":{"name":"Simon Grimm","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/24d44b251756bd6488dcb741eec0bef6"},"headline":"5 Examples of the new Ionic 6 Bottom Sheet Modal","datePublished":"2021-12-14T16:58:06+00:00","dateModified":"2021-12-15T00:54:19+00:00","mainEntityOfPage":{"@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal"},"wordCount":1841,"commentCount":0,"publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"image":{"@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif?1","keywords":["Angular","Ionic"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal","url":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal","name":"5 Examples of the new Ionic 6 Bottom Sheet Modal - Ionic Blog","isPartOf":{"@id":"https:\/\/ionic.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#primaryimage"},"image":{"@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#primaryimage"},"thumbnailUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif?1","datePublished":"2021-12-14T16:58:06+00:00","dateModified":"2021-12-15T00:54:19+00:00","description":"Get the details on how to use the brand new Ionic Bottom Sheet component in this guest blog post from Simon Grimm.","breadcrumb":{"@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#primaryimage","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2021\/12\/modal-1.gif","width":408,"height":793},{"@type":"BreadcrumbList","@id":"https:\/\/ionic.io\/blog\/5-examples-of-the-new-ionic-6-bottom-sheet-modal#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ionic.io\/blog"},{"@type":"ListItem","position":2,"name":"5 Examples of the new Ionic 6 Bottom Sheet Modal"}]},{"@type":"WebSite","@id":"https:\/\/ionic.io\/blog\/#website","url":"https:\/\/ionic.io\/blog\/","name":"ionic.io\/blog","description":"Build amazing native and progressive web apps with the web","publisher":{"@id":"https:\/\/ionic.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ionic.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ionic.io\/blog\/#organization","name":"Ionic","url":"https:\/\/ionic.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/10\/white-on-color.png","width":1920,"height":854,"caption":"Ionic"},"image":{"@id":"https:\/\/ionic.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/ionicframework"]},{"@type":"Person","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/24d44b251756bd6488dcb741eec0bef6","name":"Simon Grimm","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ionic.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/08\/simon-150x150.jpg","contentUrl":"https:\/\/ionic.io\/blog\/wp-content\/uploads\/2020\/08\/simon-150x150.jpg","caption":"Simon Grimm"},"sameAs":["https:\/\/x.com\/schlimmson"],"url":"https:\/\/ionic.io\/blog\/author\/schlimmson"}]}},"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/3983","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/comments?post=3983"}],"version-history":[{"count":0,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/posts\/3983\/revisions"}],"wp:attachment":[{"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/media?parent=3983"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/categories?post=3983"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ionic.io\/blog\/wp-json\/wp\/v2\/tags?post=3983"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}