/ionic-frameworks:ionic-vuefrom ionic-frameworks
Guides development of Ionic apps with Vue 3.5+, covering project structure, Vue-specific components (IonPage, IonRouterOutlet, IonTabs), Vue Router navigation, Ionic lifecycle hooks, composables, tab routing, lazy loading, and platform detection.
Ships in ionic-frameworks. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Develop Ionic apps with Vue — project structure, components, navigation, lifecycle hooks, composables, and Vue-specific patterns.
@ionic/vue and @ionic/vue-router. This is the current major version, and all examples use it. Ionic 7 and 8 projects differ only in the points of the table below.Read the major version of @ionic/vue in package.json before writing code.
| Topic | Ionic 9 | Ionic 7 and 8 |
|---|---|---|
| Vue | 3.5.0 or later | 3.0.6 or later |
| Vue Router | 5 (vue-router@5) | 4 (vue-router@4) |
next() in navigation guards | Deprecated by Vue Router 5. Return a value instead. | Allowed |
| Swipe back gesture | swipe-gesture property on ion-router-outlet. The config option swipeBackEnabled is read once when the outlet mounts. | swipeBackEnabled config option |
| Picker overlay | Removed. Use the inline ion-picker in an ion-modal. | ion-picker-legacy and pickerController in Ionic 8 |
Vue Router 5 has no runtime breaking changes for Vue Router 4 code. The routing patterns of this skill work in all these versions. To move a project from Ionic 8 to 9, use the ionic-app-upgrades skill.
package.json dependencies (@ionic/vue, vue, @capacitor/core), platforms (android/, ios/), build tools (vite.config.ts), and TypeScript usage. Only ask the user when something cannot be detected.<script setup> (Composition API) or Options API and generate code that matches the existing style. Default to <script setup lang="ts"> for new files unless the project uses a different pattern.Auto-detect the following by reading project files:
Ionic version: Read @ionic/vue version from package.json.
grep -E '"@ionic/vue"|"@ionic/vue-router"|"vue"|"vue-router"' package.json
Vue version: Read vue and vue-router versions from package.json.
Capacitor version: Read @capacitor/core version from package.json (if present).
TypeScript: Check if tsconfig.json exists and if .vue files use <script setup lang="ts">.
Platforms: Check which directories exist (android/, ios/).
Router config: Locate the router file (typically src/router/index.ts).
Project template: Determine if the project uses tabs, side-menu, or blank template by examining the router configuration and App.vue.
A standard Ionic Vue project follows this structure:
project-root/
├── android/ # Android native project (generated by Capacitor)
├── ios/ # iOS native project (generated by Capacitor)
├── public/
├── src/
│ ├── components/ # Reusable Vue components
│ ├── composables/ # Custom composables
│ ├── router/
│ │ └── index.ts # Vue Router configuration (uses @ionic/vue-router)
│ ├── theme/
│ │ └── variables.css # Ionic CSS custom properties
│ ├── views/ # Page components (routed views)
│ ├── App.vue # Root component (contains IonApp + IonRouterOutlet)
│ └── main.ts # Entry point (installs IonicVue plugin)
├── capacitor.config.ts # Capacitor configuration
├── package.json
├── tsconfig.json
└── vite.config.ts
If the project does not follow this structure, adapt all guidance to the project's actual directory layout. Do not restructure the project unless the user explicitly asks.
The entry point src/main.ts installs the IonicVue plugin and mounts the app:
import { createApp } from 'vue';
import { IonicVue } from '@ionic/vue';
import App from './App.vue';
import router from './router';
/* Ionic CSS */
import '@ionic/vue/css/core.css';
import '@ionic/vue/css/normalize.css';
import '@ionic/vue/css/structure.css';
import '@ionic/vue/css/typography.css';
import '@ionic/vue/css/padding.css';
import '@ionic/vue/css/float-elements.css';
import '@ionic/vue/css/text-alignment.css';
import '@ionic/vue/css/text-transformation.css';
import '@ionic/vue/css/flex-utils.css';
import '@ionic/vue/css/display.css';
/* Theme */
import './theme/variables.css';
const app = createApp(App).use(IonicVue).use(router);
router.isReady().then(() => {
app.mount('#app');
});
The root App.vue contains IonApp and IonRouterOutlet:
<template>
<ion-app>
<ion-router-outlet />
</ion-app>
</template>
<script setup lang="ts">
import { IonApp, IonRouterOutlet } from '@ionic/vue';
</script>
Read references/components.md for detailed component patterns.
Key rules:
@ionic/vue — e.g., import { IonButton, IonContent, IonPage } from '@ionic/vue'.IonPage as its root template element. Without it, page transitions break and Ionic lifecycle hooks do not fire.$el — e.g., contentRef.value.$el.scrollToBottom(300).ionicons/icons — never pass icon names as strings.v-model on Ionic form components (IonInput, IonToggle, IonSelect, IonCheckbox, IonRange).@ion-change, @ion-infinite. With addEventListener, kebab-case is required.<keep-alive>, <transition> or <router-view> in an Ionic Vue app. ion-router-outlet handles page caching and transitions.ion-img in new code. It is deprecated in Ionic 9. Use <img loading="lazy" decoding="async" />.Read references/navigation.md for detailed routing patterns.
Key principles:
createRouter from @ionic/vue-router, not from vue-router. The Ionic version wraps Vue Router to enable page transitions.router-link attribute on Ionic components with optional router-direction and router-animation.useIonRouter composable for Ionic-specific transitions, or useRouter from vue-router for standard navigation.component: () => import('@/views/DetailPage.vue').IonTabs and IonRouterOutlet. Each tab maintains its own navigation stack.IonModal for views shared across tabs.next(). Vue Router 5 (Ionic 9) prints a deprecation warning for next().Read references/lifecycle.md for detailed lifecycle patterns.
Key principles:
IonRouterOutlet keeps pages in the DOM. Vue's onMounted fires only once per page, not on every visit.onIonViewWillEnter — Refresh data every time the page appears.onIonViewDidEnter — Start animations or focus inputs after the page transition finishes.onIonViewWillLeave — Save state or unsubscribe.onIonViewDidLeave — Clean up off-screen resources.IonPage as the root element.Read references/composables.md for detailed composable documentation.
Available composables and utilities from @ionic/vue:
| Function | Purpose |
|---|---|
useIonRouter() | Programmatic navigation with transition control |
useBackButton(priority, handler) | Handle Android hardware back button |
useKeyboard() | Reactive keyboard visibility and height |
onIonViewWillEnter(cb) | Lifecycle: page about to show |
onIonViewDidEnter(cb) | Lifecycle: page fully visible |
onIonViewWillLeave(cb) | Lifecycle: page about to hide |
onIonViewDidLeave(cb) | Lifecycle: page fully hidden |
isPlatform(name) | Check current platform (ios, android, hybrid, etc.) |
getPlatforms() | Get array of all matching platform identifiers |
Use isPlatform from @ionic/vue to conditionally execute platform-specific logic:
<script setup lang="ts">
import { isPlatform } from '@ionic/vue';
const isIOS = isPlatform('ios');
const isAndroid = isPlatform('android');
const isNative = isPlatform('hybrid');
const isMobileWeb = isPlatform('mobileweb');
</script>
<template>
<div>
<p v-if="isNative">Running as a native app</p>
<p v-else>Running in a browser</p>
</div>
</template>
Supported identifiers: android, capacitor, cordova, desktop, electron, hybrid, ios, ipad, iphone, mobile, mobileweb, phablet, pwa, tablet.
After implementing changes, build the web app and run it on a device or emulator. npx cap run syncs the project first. Without --target it asks in the terminal which device to use, so list the devices first and pass an ID:
npm run build
npx cap run android --list
npx cap run android --target <DEVICE_ID>
npx cap run ios --list
npx cap run ios --target <DEVICE_ID>
For development in the browser with live reload, start the dev server. The command does not exit, so run it in the background. --no-open stops it from opening a browser window:
ionic serve --no-open
For native live reload, pass the device and the IP address of the development machine. Without them the command asks in the terminal. It does not exit either, so run it in the background:
ionic cap run android --livereload --external --target=<DEVICE_ID> --public-host=<LAN_IP>
ionic cap run ios --livereload --external --target=<DEVICE_ID> --public-host=<LAN_IP>
<LAN_IP> is the IP address of the development machine in the local network, for example the output of ipconfig getifaddr en0 on macOS. The device must be in the same network.
Failed to resolve component: ion-*: The Ionic component is not imported. Add the missing import from @ionic/vue in the <script> section (e.g., import { IonButton } from '@ionic/vue').IonPage as its root template element. Without IonPage, transitions and lifecycle hooks silently fail.IonPage is the root element and the component is directly mapped to a route in the router configuration. Lifecycle hooks do not fire on child components.Method on component is not a function: Access the underlying Web Component via $el — e.g., ref.value.$el.scrollToBottom(), not ref.value.scrollToBottom().'vue/no-deprecated-slot-attribute': 'off' in the rules of eslint.config.js (or .eslintrc.js in an older project).addEventListener, write the event name in kebab-case (ion-modal-did-present), not in camelCase.base in vite.config.ts is not /. Capacitor serves the app from a local origin, so prefixed asset paths do not resolve. Set base: '/' or remove the option, then build and sync again.next(): A navigation guard calls next() under Vue Router 5. Return false, true or a route location instead.useIonRouter or useBackButton fails: These composables use Vue's inject() internally and must be called inside setup() or <script setup>, not in standalone functions or callbacks.router.go() with non-linear (tab-based) routing. Use useIonRouter().push() or router-link instead.onMounted fires only once: IonRouterOutlet caches pages in the DOM. Use onIonViewWillEnter instead of onMounted for logic that must run every time the page is shown.IonPage as the root element. IonPage sets up the proper flexbox layout.ionic-app-development — General Ionic development guidance: components, theming, CLI usage.ionic-app-creation — Create a new Ionic app from scratch.capacitor-vue — Capacitor-specific Vue patterns (plugins, hooks, services) without Ionic Framework.ionic-app-upgrades — Upgrade Ionic Framework to a newer version.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub capawesome-team/skills --plugin ionic-frameworks3 skills in this plugin
/ionic-angularGuides the agent through Angular-specific patterns for Ionic app development. Covers project structure, standalone vs NgModule architecture detection, the Ionic 9 import paths (@ionic/angular and @ionic/angular/lazy) and the Ionic 8 paths, Angular Router integration with Ionic navigation (tabs, side menu, modals), lazy loading, Ionic page lifecycle hooks, zoneless change detection, reactive forms with Ionic input components, Angular services for state management, route guards, performance optimization, and testing with Vitest and Playwright. Do not use for creating a new Ionic app from scratch, upgrading Ionic versions, general Ionic component usage unrelated to Angular, Capacitor plugin integration, or non-Angular frameworks (React, Vue)./ionic-reactGuides the agent through Ionic Framework development with React — project structure, React-specific Ionic components, IonReactRouter and navigation patterns with React Router 6 (Ionic 9) and React Router 5 (Ionic 8 and older), Ionic lifecycle hooks (useIonViewWillEnter, useIonViewDidEnter, useIonViewWillLeave, useIonViewDidLeave), overlay hooks, state management integration, and React-specific best practices for Ionic apps. Do not use for plain Capacitor React apps without Ionic (use capacitor-react), Ionic with Angular or Vue, creating a new Ionic app (use ionic-app-creation), upgrading Ionic to a newer version (use ionic-app-upgrades), or general Ionic component usage without React-specific context (use ionic-app-development).Other plugins' skills for the same job