/ionic-core:ionic-app-developmentfrom ionic-core
Guides Ionic Framework development covering core concepts, component reference, CLI usage, layout, theming, animations, gestures, and troubleshooting for Ionic 9.
Ships in ionic-core. 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.
General Ionic Framework development — core concepts, component reference, CLI usage, layout, theming, utilities, development workflow, and troubleshooting.
npm install -g @ionic/cli).ionic-app-creation skill.This skill and its reference files describe Ionic 9, the current major version. Notes marked "Ionic 8" say what differs in the previous version. To move a project to Ionic 9, use the ionic-app-upgrades skill.
Auto-detect the framework and the version. Check package.json for @ionic/angular, @ionic/react, or @ionic/vue to determine the framework in use and the major version of Ionic. Adapt code examples accordingly.
grep -E '"@ionic/(angular|react|vue|core)"' package.json
Route to reference files. This skill is an overview that routes agents to specific reference files for detailed component APIs and topic-specific guidance.
Do not duplicate framework-specific skills. For Angular, React, or Vue specific patterns, refer to the respective framework skill.
Ionic Framework is a UI toolkit for building cross-platform apps using web technologies (HTML, CSS, JavaScript/TypeScript). It provides a library of pre-built UI components that adapt their styling to the platform (ios or md mode).
ion- (e.g., <ion-button>, <ion-content>).ios mode; Android and all other platforms use the md (Material Design) mode. The <html> element receives a class (ios or md) that enables platform-specific styles.capacitor-app-development skill for Capacitor-specific guidance.Ionic provides lifecycle events on top of the framework's own lifecycle hooks. These fire when a page is navigated to or from:
| Event | Description |
|---|---|
ionViewWillEnter | Fires when the page is about to enter and become active. |
ionViewDidEnter | Fires when the page has fully entered and is now active. |
ionViewWillLeave | Fires when the page is about to leave and become inactive. |
ionViewDidLeave | Fires when the page has fully left and is now inactive. |
These are in addition to the framework-specific lifecycle hooks (e.g., Angular's ngOnInit, React's useEffect, Vue's onMounted). Use Ionic lifecycle events for tasks that should run each time a page becomes visible (e.g., refreshing data), since some navigation strategies cache pages.
Ionic provides more than 90 UI components. Detailed API documentation for each component is organized into reference files by category. Each reference file covers properties, events, methods, slots, CSS shadow parts, and CSS custom properties.
When the user needs help with a specific component, read the corresponding reference file. The full API of a component is at https://ionicframework.com/docs/api/<name>, for example https://ionicframework.com/docs/api/modal. The Ionic 8 version of a page is at https://ionicframework.com/docs/v8/api/<name>.
Components that changed in Ionic 9:
| Component | Change in Ionic 9 |
|---|---|
ion-img | Deprecated. It will be removed in Ionic 10. Use <img loading="lazy" decoding="async">. |
ion-picker-legacy, ion-picker-legacy-column, pickerController | Removed. Use the inline ion-picker. |
ion-input, ion-searchbar | autocorrect is a boolean now. autocorrect="off" turns autocorrect on. |
ion-modal | handleBehavior defaults to "cycle". |
ion-router-outlet | New property swipeGesture. |
ion-select | ionChange fires only when the value changes. The shadow part inner is replaced by start, control and end. |
ion-nav | No longer works together with ion-router. |
| Category | Reference File | Components Covered |
|---|---|---|
| Action & Buttons | references/components-action.md | button, fab, fab-button, fab-list, ripple-effect |
| Data Display | references/components-data-display.md | accordion, accordion-group, badge, card, card-content, card-header, card-subtitle, card-title, chip, item, item-divider, item-group, item-sliding, item-options, item-option, label, list, list-header, note, text |
| Form | references/components-form.md | checkbox, datetime, datetime-button, input, input-otp, input-password-toggle, picker, picker-column, picker-column-option, radio, radio-group, range, searchbar, select, select-option, segment, segment-button, segment-content, segment-view, textarea, toggle |
| Layout | references/components-layout.md | app, content, grid, col, row, header, footer, toolbar, title, buttons, back-button, split-pane |
| Media | references/components-media.md | avatar, icon, img, thumbnail |
| Navigation | references/components-navigation.md | breadcrumb, breadcrumbs, menu, menu-button, menu-toggle, nav, nav-link, router, router-link, router-outlet, route, route-redirect, tabs, tab, tab-bar, tab-button |
| Overlay | references/components-overlay.md | action-sheet, alert, loading, modal, popover, toast, backdrop |
| Scroll & Virtual | references/components-scroll.md | infinite-scroll, infinite-scroll-content, refresher, refresher-content, reorder, reorder-group |
| Progress | references/components-progress.md | progress-bar, skeleton-text, spinner |
The Ionic CLI is the primary tool for developing Ionic apps. Below are the most commonly used commands. Run ionic --help for the full and always up-to-date command list.
npm install -g @ionic/cli
If upgrading from the legacy ionic package:
npm uninstall -g ionic
npm install -g @ionic/cli
| Command | Description |
|---|---|
ionic serve --no-open | Start a local dev server with live reload. Does not exit, so run it in the background. Without --no-open it opens a browser window. |
ionic serve --external | Serve on all network interfaces (for testing on devices). |
ionic serve --port=<port> | Serve on a custom port (default: 8100). |
ionic serve --prod | Serve with production build configuration. |
ionic build | Build the web assets. |
ionic build --prod | Build the web assets with the production configuration. |
ionic generate <type> <name> | Angular projects only. Generate a page, component, service or another Angular feature, e.g. ionic generate page contact. Without arguments the command asks in the terminal. |
ionic capacitor run <platform> --target=<DEVICE_ID> | Build the web assets and run the app on a device or emulator (android or ios). Without --target the command asks for a device. List the devices with --list. |
ionic info | Print system/environment info for bug reports. Add --json for JSON output. |
ionic repair | Remove and recreate the dependencies of the project. |
Global flags that work with every command:
| Flag | Description |
|---|---|
--no-interactive | Turn off terminal prompts. Use it when an agent or a CI job runs a command. |
--confirm | Answer confirmation prompts with yes automatically. Use with care. |
--verbose | Print all log messages for debugging. |
--quiet | Print only WARN and ERROR messages. |
--help | Show the help page of a command instead of running it. |
The Ionic CLI also has commands that connect to Ionic Appflow, such as ionic link, ionic login and ionic live-update. Ionic stopped selling Appflow to new customers in February 2025, and the service ends on December 31, 2027. For cloud builds and live updates use the capawesome-cloud skill, and for an app that already uses Appflow use the ionic-appflow-migration skill.
ionic serve Options| Option | Description |
|---|---|
--ssl | Enable HTTPS (experimental). |
--no-livereload | Serve without automatic reloading. |
--no-open | Do not open a browser window automatically. |
--consolelogs | Print app console output in terminal. |
--browser=<browser> | Open in a specific browser (safari, firefox, google chrome). |
--browseroption=<path> | Open a specific URL path (e.g., /#/tab/dash). |
For framework-specific CLI options, pass them after --:
ionic serve -- --proxy-config proxy.conf.json
Read references/components-layout.md for the full API reference for layout components.
Ionic uses a 12-column flexbox grid system (ion-grid, ion-row, ion-col). Columns expand to fill the row evenly unless a size attribute is specified (1-12).
Responsive breakpoints:
| Breakpoint | Min Width | ion-col size property (attribute) |
|---|---|---|
xs | 0 | sizeXs (size-xs) |
sm | 576px | sizeSm (size-sm) |
md | 768px | sizeMd (size-md) |
lg | 992px | sizeLg (size-lg) |
xl | 1200px | sizeXl (size-xl) |
Ionic provides responsive CSS utility classes for common styling needs:
.ion-text-center, .ion-text-start, .ion-text-end, .ion-text-wrap, .ion-text-nowrap, .ion-text-uppercase, .ion-text-lowercase, .ion-text-capitalize.ion-padding, .ion-padding-top, .ion-padding-bottom, .ion-padding-start, .ion-padding-end, .ion-padding-vertical, .ion-padding-horizontal, .ion-no-padding.ion-margin, .ion-margin-top, .ion-margin-bottom, .ion-margin-start, .ion-margin-end, .ion-margin-vertical, .ion-margin-horizontal, .ion-no-margin.ion-display-none, .ion-display-block, .ion-display-flex, .ion-display-inline, .ion-display-grid.ion-float-left, .ion-float-right, .ion-float-start, .ion-float-end.ion-justify-content-center, .ion-align-items-center, .ion-flex-row, .ion-flex-column, .ion-flex-wrap, .ion-flex-nowrap.ion-no-borderThe text, float, display and flex classes have responsive variants with a breakpoint (sm, md, lg, xl) after the first word: ion-text-{breakpoint}-center (e.g., .ion-text-md-center applies at 768px+), ion-float-{breakpoint}-start, ion-display-{breakpoint}-none, ion-justify-content-{breakpoint}-center. The padding and margin classes have no responsive variants.
The older classes .ion-hide, .ion-hide-{breakpoint}-up, .ion-hide-{breakpoint}-down, .ion-nowrap, .ion-wrap and .ion-wrap-reverse are deprecated. Use the .ion-display-* and .ion-flex-* classes instead.
Ionic provides nine default colors: primary, secondary, tertiary, success, warning, danger, light, medium, dark. Apply via the color attribute on components:
<ion-button color="primary">Primary</ion-button>
<ion-button color="danger">Danger</ion-button>
Each color has six CSS custom properties:
--ion-color-{name} — Base color value--ion-color-{name}-rgb — Base color in RGB format--ion-color-{name}-contrast — Text color for readability--ion-color-{name}-contrast-rgb — Contrast color in RGB format--ion-color-{name}-shade — Darker variant (active/pressed states)--ion-color-{name}-tint — Lighter variant (hover states)To customize a color, override all six variables in :root:
:root {
--ion-color-primary: #3880ff;
--ion-color-primary-rgb: 56, 128, 255;
--ion-color-primary-contrast: #ffffff;
--ion-color-primary-contrast-rgb: 255, 255, 255;
--ion-color-primary-shade: #3171e0;
--ion-color-primary-tint: #4c8dff;
}
To add a custom color, define the CSS variables and create a class:
:root {
--ion-color-favorite: #69bb7b;
--ion-color-favorite-rgb: 105, 187, 123;
--ion-color-favorite-contrast: #ffffff;
--ion-color-favorite-contrast-rgb: 255, 255, 255;
--ion-color-favorite-shade: #5ca56c;
--ion-color-favorite-tint: #78c288;
}
.ion-color-favorite {
--ion-color-base: var(--ion-color-favorite);
--ion-color-base-rgb: var(--ion-color-favorite-rgb);
--ion-color-contrast: var(--ion-color-favorite-contrast);
--ion-color-contrast-rgb: var(--ion-color-favorite-contrast-rgb);
--ion-color-shade: var(--ion-color-favorite-shade);
--ion-color-tint: var(--ion-color-favorite-tint);
}
| Variable | Description |
|---|---|
--ion-background-color | Background color of the app |
--ion-text-color | Text color of the app |
--ion-font-family | Font family of the app |
--ion-statusbar-padding | Statusbar padding top of the app |
--ion-safe-area-top | Adjust safe area inset top |
--ion-safe-area-right | Adjust safe area inset right |
--ion-safe-area-bottom | Adjust safe area inset bottom |
--ion-safe-area-left | Adjust safe area inset left |
--ion-margin | Default margin for margin utility classes |
--ion-padding | Default padding for padding utility classes |
--ion-placeholder-opacity | Opacity of placeholder text in inputs |
Ionic supports three dark mode approaches. Each is one CSS file. Import exactly one of them from the package of the framework in use:
| Framework | Where to import | Form |
|---|---|---|
| Angular | src/global.scss | @import '@ionic/angular/css/palettes/dark.system.css'; |
| React | src/App.tsx | import '@ionic/react/css/palettes/dark.system.css'; |
| Vue | src/main.ts | import '@ionic/vue/css/palettes/dark.system.css'; |
| Core | the main script | import '@ionic/core/css/palettes/dark.system.css'; |
The examples below use the Angular form.
Automatically applies dark palette based on the user's OS setting:
@import '@ionic/angular/css/palettes/dark.system.css';
Forces dark mode regardless of system settings:
@import '@ionic/angular/css/palettes/dark.always.css';
Enables manual dark mode control via a CSS class:
@import '@ionic/angular/css/palettes/dark.class.css';
Add .ion-palette-dark to the <html> element to activate:
<html class="ion-palette-dark">
Add this meta tag to adjust system UI elements (scrollbars, etc.):
<meta name="color-scheme" content="light dark" />
Ionic uses two modes for platform-specific styling:
| Platform | Default Mode | Style |
|---|---|---|
| iOS | ios | Apple iOS design |
| Android | md | Material Design |
| Other / Web | md | Material Design |
To preview a specific mode in the browser, add ?ionic:mode=ios or ?ionic:mode=md to the URL:
http://localhost:8100/?ionic:mode=ios
Target mode-specific styles in CSS:
.ios ion-toolbar {
--background: #f8f8f8;
}
.md ion-toolbar {
--background: #ffffff;
}
The primary development workflow is browser-based. The dev server does not exit, so run it in the background. --no-open stops it from opening a browser window:
ionic serve --no-open
This starts a development server at http://localhost:8100 with live reload.
Use browser DevTools to simulate mobile devices:
Cmd+Opt+I (Mac) / Ctrl+Shift+I (Windows/Linux), then toggle device toolbarCmd+Opt+R for Responsive Design ModeCmd+Opt+M (Mac) / Ctrl+Shift+M (Windows/Linux)For native functionality that requires a real device, build the web assets and run the app. 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:
ionic 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 live reload on a device, use the Ionic CLI. It starts the dev server and runs the app against it. Pass the device and the IP address of the development machine. Without them the command asks in the terminal. It does not exit, so run it in the background:
ionic capacitor run android --livereload --external --target=<DEVICE_ID> --public-host=<LAN_IP>
ionic capacitor 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 and the development machine must be on the same network.
debugger keyword to set breakpoints in code.?ionic:mode=ios to the URL to preview iOS styles in the browser.ionic info to collect environment info for troubleshooting.Ionic provides a framework-agnostic animation utility built on the Web Animations API. Import:
import { createAnimation } from '@ionic/core';AnimationController from @ionic/angular (from @ionic/angular/lazy in an app that uses IonicModule)CreateAnimation component or the createAnimation function from @ionic/reactimport { createAnimation } from '@ionic/vue';Key methods: addElement(), duration(), easing(), fromTo(), keyframes(), play(), pause(), stop(), onFinish().
Animations support grouping (parent-child), chaining (via play() promises), and integration with gestures.
For performance, prefer animating transform and opacity over height and width.
Ionic provides a framework-agnostic gesture utility. Import:
import { createGesture } from '@ionic/core';GestureController from @ionic/angular (from @ionic/angular/lazy in an app that uses IonicModule)import { createGesture } from '@ionic/react';import { createGesture } from '@ionic/vue';Configuration options: el, gestureName, threshold, direction (x/y), maxAngle, gesturePriority, disableScroll, passive.
Callbacks: canStart, onWillStart, onStart, onMove, onEnd, notCaptured.
The GestureDetail object provides startX/startY, currentX/currentY, deltaX/deltaY, and velocityX/velocityY.
Ionic emits an ionBackButton event when the Android hardware back button is pressed. Handlers are priority-based:
| Priority | Handler |
|---|---|
| 100 | Overlays |
| 99 | Menu |
| 0 | Navigation |
For Capacitor apps, install @capacitor/app to enable hardware back button support. Pin it to the major version of @capacitor/core in package.json, for Capacitor 8 with npm install @capacitor/app@8. The npm tag latest of the official Capacitor packages no longer fits a Capacitor 8 project, so always pin the version. See the framework-specific skills for implementation patterns.
ionic: command not found: The Ionic CLI is not installed. Run npm install -g @ionic/cli.ionic serve --no-open --port=<other-port>.@import '@ionic/angular/css/core.css';. For React/Vue: check the framework-specific import.@ionic/angular, @ionic/react, or @ionic/vue is installed and configured. The <html> element should have an ios or md class..ion-palette-dark is applied to the <html> element.--background, --color) rather than targeting internal elements directly. Check the component reference file for available properties.ionic capacitor run <platform> --livereload --external --target=<DEVICE_ID> --public-host=<LAN_IP>. The flags --livereload and --external belong to the Ionic CLI, not to npx cap run.--no-interactive.ion-picker-legacy or pickerController not found: They are removed in Ionic 9. Use the inline ion-picker from references/components-form.md.ionViewWillEnter not firing: This lifecycle event only fires with Ionic's routing components (ion-router-outlet). It does not fire with standard framework routers unless Ionic's routing integration is used.ionic-app-creation — Create a new Ionic app.ionic-angular — Ionic with Angular (framework-specific patterns).ionic-react — Ionic with React (framework-specific patterns).ionic-vue — Ionic with Vue (framework-specific patterns).ionic-app-upgrades — Upgrade Ionic to a newer major version.capacitor-app-development — General Capacitor development.capacitor-plugins — Capacitor plugins installation and configuration.ionic-framework-mcp — Connect an MCP client to the current Ionic Framework documentation.references/components-action.md (opens in a new tab)references/components-data-display.md (opens in a new tab)references/components-form.md (opens in a new tab)references/components-layout.md (opens in a new tab)references/components-media.md (opens in a new tab)references/components-navigation.md (opens in a new tab)references/components-overlay.md (opens in a new tab)references/components-progress.md (opens in a new tab)references/components-scroll.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub capawesome-team/skills --plugin ionic-core5 skills in this plugin
/ionic-app-creationGuides the agent through creating a new Ionic app using the Ionic CLI. Covers project scaffolding with ionic start in a form that asks no terminal questions, framework selection (Angular, React, Vue), template selection (blank, tabs, sidemenu, list), Capacitor integration, and optional Tailwind CSS setup. After app creation with Capacitor integration, delegates to the capacitor-app-creation skill for further Capacitor setup. Do not use for existing Ionic projects, migrating Ionic apps, upgrading Capacitor versions, or non-Ionic mobile frameworks./ionic-app-upgradesGuides the agent through upgrading an Ionic Framework app to a newer major version. Supports upgrades from Ionic 4 through 9, including multi-version jumps. Covers the automated Ionic migration tool for Ionic 9, framework-specific steps for Angular, React, and Vue (including the moves to React Router 6 and Vue Router 5), component breaking changes, CSS changes, and browser support changes. Do not use for Capacitor version upgrades (use capacitor-app-upgrades instead), for plugin library upgrades, or for non-Ionic UI frameworks./ionic-expertA comprehensive starting point for AI agents to work with the Ionic Framework. Covers core concepts, version requirements and the differences between Ionic 8 and Ionic 9, components, CLI, theming, layout, lifecycle, navigation, and framework-specific patterns for Angular, React, and Vue. Pair with the other Ionic skills in this collection for deeper topic-specific guidance like app creation, framework integration, and upgrades. Do not use for Capacitor plugin APIs, native iOS or Android configuration, or non-Ionic UI frameworks./ionic-framework-mcpGuides the agent through connecting an MCP client to the hosted, unofficial Ionic Framework MCP server by Capawesome, which serves the official Ionic Framework documentation for v9 and v8, the component API reference, the official usage examples for Angular, React, Vue and vanilla JavaScript, and the Ionic blog. Covers client detection, setup for Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Zed and stdio-only clients, documentation version selection, verification, and troubleshooting. Do not use for Capacitor plugins or native iOS and Android configuration, upgrading or migrating apps to a newer version, Capawesome Cloud, or MCP servers other than the Ionic Framework one.Other plugins' skills for the same job