Ionic integration adapters for Vue.
Ionic-Vue codebase has been contributed to the Ionic core and as @ionic/vue. However,
@ionic/vue provides limited support to Ionic v4.
The amazing Ionic team is always looking to bring the most modern of browser capabilities to their framework. The official Vue support will land after Vue 3 has stabilized.
Modus Create engineers continue to maintain this library to support the community that wants to create beautiful mobile apps with Vue and Ionic.
Our goal is to allow developers to be up to date with the latest advances of Ionic and Vue. Thus we are delivering features and bug fixes as fast as possible.
Overview: all of the controllers and major features such as transitions and router have been implemented and tested for several months now. Apart from minor improvements and further testing of various mixes of Ionic components and implementations this library is considered feature complete.
|Router View||✔️||✔️||Fully implemented|
|MS Edge Fix||✔️||✔️||Fully implemented|
|Import controllers directly||✔️||Pending||Improve treeshaking and sync with react and angular implementations|
|Restore scroll on navigation||✔️||-||When going back through history restore the scroll position|
|Unit tests||❌||❌||Outdated as were originally written in plain JS, need to be updated for TS|
Ionic versions 4 and 5
⚠️ Moving forward all versions of
ionic-vue will be supporting Ionic 5 only, if you'd like to continue using Ionic 4 please use
🚧 We are actively developing the next major version of this library. It supports Vue 3 and all of the new APIs like Composition, new transition features, etc. You can track the progress in the dev branch.
Installing / Getting started
A quick introduction of the minimal setup you need to get a hello world up and running.
npm install @ionic/core @modus/ionic-vue
Now you can use it during the initialization step of your Vue app.
VueVuerouter:routes:path: '/' component: Homepath: '/page' import'./Page.vue'
Ionic requires a root element of
ion-app in your HTML.
ion-vue-router element in order to render Ionic transitions. Otherwise you can use the official VueRouter
IonicVue abstracts DOM interaction of Ionic UI components inside a Vue application.
IonicVue supports all of the Ionic controllers:
IonicVueRouter binds Ionic transitions and routing functionalities with Vue Router.
It is an extension of the official Vue Router thus it can be used as a drop-in replacement with all of the methods, hooks, etc. working as expected.
Setting up Dev
Simply clone the repo and install dependencies to get started with development.
git clone https://github.com/moduscreateorg/ionic-vue.gitcd ionic-vue/npm install
Testing will require peer dependencies to be installed. Peer dependencies are:
You can install peer dependencies without modifying package.json.
npm run install.peer
We recommend trying out your
ionic-vue changes in an actual app. You can do that with
cd ionic-vue/npm linkcd ../sample-app/npm link @modus/ionic-vue
Beep is a fantastic sample application you can use to test
Rollup automatically creates distribution packages.
For development build run:
npm run dev
For automatic rebuild on changes run:
npm run watch
For production build run:
npm run prod
Make sure you have installed peer dependencies (explained above) before running tests.
The ionic-vue project uses SonarQube's SonarCloud product for static analysis scans.
Our publicly available dashboard for the project can be found here
Modus Create is a digital product consultancy. We use a distributed team of the best talent in the world to offer a full suite of digital product design-build services; ranging from consumer facing apps, to digital migration, to agile development training, and business transformation.
This project is part of Modus Labs.
This project is MIT licensed.