December 12, 2022
  • Announcements
  • Framework
  • Ionic 6
  • release

Announcing Ionic v6.4

Liam DeBeasi

We’re excited to announce the release of Ionic 6.4, which contains improvements to modal, toast, and toggle.

Here’s what’s new in this release:

Modal canDismiss Improvements

In Ionic 6.1, we added the canDismiss property to ion-modal. This property lets developers control precisely when users can leave a modal. In Ionic 6.4, we enhanced this feature by passing the “role” and “data” information when providing a callback to canDismiss. This can be used to make more informed decisions about when a modal should dismiss.

canDismiss(role: string, data: any) {
  // Disallow dismissing the modal via a swipe gesture
  return role !== ‘gesture’;

Toast Duration Configuration

Toasts can now have the default duration property customized globally using the new toastDuration configuration.

  // All toasts will now dismiss after 5000ms.
  toastDuration: 5000

Thank you to @DwieDima for building this feature!

Toggle On/Off Label Configuration

In Ionic 6.2, we introduced the enableOnOffLabels property to ion-toggle to provide a better visual indication of state. In Ionic 6.4, we added the ability to customize this property on a global level using the new toggleOnOffLabels configuration.

  // All toggles will have on/off labels
  toggleOnOffLabels: true

Thank you to @EinfachHans for building this feature!

Thank You

As we approach the end of 2022, we want to thank the entire Ionic community for making this an amazing year for the project. We have lots of exciting improvements in store for 2023!

As always, we would love any feedback on our GitHub repo.

Liam DeBeasi