ionic
Ionic hybrid mobile framework with web technologies. Use for hybrid mobile apps.
Best use case
ionic is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Ionic hybrid mobile framework with web technologies. Use for hybrid mobile apps.
Teams using ionic should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ionic/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ionic Compares
| Feature / Agent | ionic | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Ionic hybrid mobile framework with web technologies. Use for hybrid mobile apps.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Ionic
Ionic Framework is an open-source UI toolkit for building performant, high-quality mobile and desktop apps using web technologies (HTML, CSS, JavaScript) with integrations for Angular, React, and Vue.
## When to Use
- Web developers (Angular/React/Vue) wanting to build mobile apps.
- Building a Progressive Web App (PWA) and mobile app from the exact same codebase.
- Apps with heavy data entry forms or standard UI patterns (lists, tabs).
- Enterprise apps requiring write-once-deploy-everywhere.
## Quick Start
```bash
# Install CLI
npm install -g @ionic/cli
# Start a React app with tabs
ionic start myApp tabs --type=react --capacitor
cd myApp
ionic serve
```
```tsx
// src/pages/Home.tsx (Ionic React)
import {
IonContent,
IonHeader,
IonPage,
IonTitle,
IonToolbar,
IonButton,
IonIcon,
IonList,
IonItem,
IonLabel,
} from "@ionic/react";
import { camera } from "ionicons/icons";
import { Camera, CameraResultType } from "@capacitor/camera";
const Home: React.FC = () => {
const takePhoto = async () => {
const image = await Camera.getPhoto({
quality: 90,
allowEditing: false,
resultType: CameraResultType.Uri,
});
console.log("Photo URI", image.webPath);
};
return (
<IonPage>
<IonHeader>
<IonToolbar>
<IonTitle>Ionic Camera</IonTitle>
</IonToolbar>
</IonHeader>
<IonContent fullscreen>
<div style={{ padding: 20 }}>
<IonButton expand="block" onClick={takePhoto}>
<IonIcon slot="start" icon={camera} />
Take Photo
</IonButton>
</div>
</IonContent>
</IonPage>
);
};
export default Home;
```
## Core Concepts
### Web Components
Ionic components (`<ion-button>`, `<ion-card>`) are Web Components. They work in any framework (or no framework) and encapsulate their styles and behavior (Shadow DOM).
### Adaptive Styling
Ionic automatically adapts the look and feel based on the platform.
- **iOS**: Uses Cupertino design standards.
- **Android**: Uses Material Design.
- No code change required.
### Capacitor Integration
Ionic uses **Capacitor** as the native bridge. It provides a Native Runtime for the web app and exposes native APIs (Camera, Geolocation, Haptics) via JavaScript plugins.
## Common Patterns
### Lazy Loading
Crucial for startup performance.
- **Angular**: Use `loadChildren` in Router.
- **React**: Use `React.lazy` and `Suspense`.
### Overlay Components
Modals, Alerts, and Action Sheets are handled via controllers or hooks (`useIonModal`), ensuring they render outside the regular DOM flow for proper z-indexing.
## Best Practices
**Do**:
- Use **Capacitor** instead of Cordova for new projects.
- Use **Virtual Scroll** (or framework equivalents) for long lists.
- Test on real devices early (Web view behavior can differ from Chrome Desktop).
- Use `ion-img` instead of `img` for efficient lazy loading within `ion-content`.
**Don't**:
- Don't block the UI thread with synchronous heavy logic (use Web Workers).
- Don't use arbitrary CSS `z-index` to fix layering (use Ionic utilities/slots).
- Don't forget to handle the **Hardware Back Button** on Android.
## Troubleshooting
| Error | Cause | Solution |
| :---------------------- | :------------------------------- | :----------------------------------------------------------- |
| `White Screen of Death` | JavaScript error during startup. | Check remote debugging console (Chrome/Safari). |
| `CORS Error` on device | Web View calling external API. | Configure server CORS or use `@capacitor-community/http`. |
| `Keyboard covers input` | Scroll view not resizing. | Ensure `<ion-content>` is used; check `windowSoftInputMode`. |
## References
- [Ionic Framework Docs](https://ionicframework.com/docs)
- [Capacitor Documentation](https://capacitorjs.com/docs)
- [Ionic UI Components](https://ionicframework.com/docs/components)Related Skills
template
Expert [skill-name] assistance covering [feature 1], [feature 2], and [feature 3]. Use when [working with X], [debugging Y], or [implementing Z].
zsh
Zsh shell with oh-my-zsh. Use for terminal shell.
zed
Zed high-performance collaborative editor. Use for fast editing.
xcode
Xcode Apple development IDE with simulators. Use for iOS/macOS development.
webstorm
WebStorm JavaScript IDE with debugging. Use for web development.
webpack
Webpack module bundler with loaders and plugins. Use for bundling.
warp
Warp modern terminal with AI. Use for terminal work.
vscode
Visual Studio Code editor with extensions and debugging. Use for code editing.
vite
Vite fast build tool with HMR. Use for modern frontend builds.
visual-studio
Visual Studio IDE for Windows with debugging and profiling. Use for .NET development.
vim
Vim text editor with motions, macros, and plugins. Use for terminal editing.
turbopack
Turbopack Rust-powered bundler. Use for fast builds.