Ionic — Cross-Platform Apps with Web Technologies
## Overview
Best use case
Ionic — Cross-Platform Apps with Web Technologies is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
## Overview
Teams using Ionic — Cross-Platform Apps with Web Technologies 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 — Cross-Platform Apps with Web Technologies Compares
| Feature / Agent | Ionic — Cross-Platform Apps with Web Technologies | 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?
## Overview
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 — Cross-Platform Apps with Web Technologies
## Overview
Ionic, the open-source framework for building cross-platform mobile, desktop, and progressive web apps using web technologies (HTML, CSS, JavaScript/TypeScript). Helps developers build apps with Ionic's UI components, integrate with native device APIs via Capacitor, and deploy to iOS, Android, and web from a single codebase.
## Instructions
### Project Setup
```bash
# Install Ionic CLI
npm install -g @ionic/cli
# Create a new project (React, Angular, or Vue)
ionic start my-app tabs --type=react
cd my-app
# Run in browser
ionic serve
# Add native platforms
ionic cap add ios
ionic cap add android
# Build and sync to native
ionic cap sync
ionic cap open ios # Opens Xcode
ionic cap open android # Opens Android Studio
```
### UI Components
```tsx
// src/pages/Home.tsx — Ionic React component with native-feeling UI
// Ionic provides 100+ UI components that adapt to iOS/Android automatically.
import {
IonContent, IonHeader, IonPage, IonTitle, IonToolbar,
IonList, IonItem, IonLabel, IonBadge, IonSearchbar,
IonRefresher, IonRefresherContent, IonFab, IonFabButton,
IonIcon, IonSegment, IonSegmentButton, IonCard, IonCardHeader,
IonCardTitle, IonCardContent, IonChip, IonAvatar,
} from "@ionic/react";
import { add, filterOutline } from "ionicons/icons";
import { useState } from "react";
const Home: React.FC = () => {
const [segment, setSegment] = useState("all");
const [searchText, setSearchText] = useState("");
const handleRefresh = async (event: CustomEvent) => {
await fetchTasks();
event.detail.complete(); // Dismiss the refresher spinner
};
return (
<IonPage>
<IonHeader>
<IonToolbar>
<IonTitle>Tasks</IonTitle>
</IonToolbar>
<IonToolbar>
<IonSearchbar
value={searchText}
onIonInput={(e) => setSearchText(e.detail.value ?? "")}
placeholder="Search tasks..."
/>
</IonToolbar>
<IonToolbar>
<IonSegment value={segment} onIonChange={(e) => setSegment(e.detail.value as string)}>
<IonSegmentButton value="all"><IonLabel>All</IonLabel></IonSegmentButton>
<IonSegmentButton value="active"><IonLabel>Active</IonLabel></IonSegmentButton>
<IonSegmentButton value="done"><IonLabel>Done</IonLabel></IonSegmentButton>
</IonSegment>
</IonToolbar>
</IonHeader>
<IonContent>
<IonRefresher slot="fixed" onIonRefresh={handleRefresh}>
<IonRefresherContent />
</IonRefresher>
<IonList>
{tasks.map((task) => (
<IonItem key={task.id} routerLink={`/task/${task.id}`}>
<IonAvatar slot="start">
<img src={task.assignee.avatar} alt="" />
</IonAvatar>
<IonLabel>
<h2>{task.title}</h2>
<p>{task.description}</p>
</IonLabel>
<IonBadge slot="end" color={task.priority === "high" ? "danger" : "medium"}>
{task.priority}
</IonBadge>
</IonItem>
))}
</IonList>
<IonFab vertical="bottom" horizontal="end" slot="fixed">
<IonFabButton routerLink="/task/new">
<IonIcon icon={add} />
</IonFabButton>
</IonFab>
</IonContent>
</IonPage>
);
};
```
### Native APIs with Capacitor
```typescript
// src/services/native.ts — Access device features via Capacitor plugins
import { Camera, CameraResultType, CameraSource } from "@capacitor/camera";
import { Geolocation } from "@capacitor/geolocation";
import { LocalNotifications } from "@capacitor/local-notifications";
import { Share } from "@capacitor/share";
import { Haptics, ImpactStyle } from "@capacitor/haptics";
import { Preferences } from "@capacitor/preferences";
// Camera — take photo or pick from gallery
export async function takePhoto(): Promise<string> {
const image = await Camera.getPhoto({
quality: 80,
allowEditing: false,
resultType: CameraResultType.Uri,
source: CameraSource.Prompt, // Let user choose camera or gallery
});
return image.webPath!;
}
// Geolocation
export async function getCurrentPosition() {
const coords = await Geolocation.getCurrentPosition({
enableHighAccuracy: true,
});
return {
lat: coords.coords.latitude,
lng: coords.coords.longitude,
};
}
// Local notifications
export async function scheduleReminder(title: string, body: string, date: Date) {
await LocalNotifications.schedule({
notifications: [{
title,
body,
id: Date.now(),
schedule: { at: date },
}],
});
}
// Share
export async function shareContent(title: string, text: string, url?: string) {
await Share.share({ title, text, url });
}
// Haptic feedback
export async function hapticTap() {
await Haptics.impact({ style: ImpactStyle.Light });
}
// Local storage (key-value, persists across app restarts)
export async function savePreference(key: string, value: string) {
await Preferences.set({ key, value });
}
export async function getPreference(key: string): Promise<string | null> {
const { value } = await Preferences.get({ key });
return value;
}
```
### Theming
```css
/* src/theme/variables.css — Custom theme */
:root {
--ion-color-primary: #4f46e5;
--ion-color-primary-rgb: 79, 70, 229;
--ion-color-primary-contrast: #ffffff;
--ion-color-primary-shade: #463ec9;
--ion-color-primary-tint: #6158e8;
--ion-color-secondary: #06b6d4;
--ion-color-success: #22c55e;
--ion-color-warning: #f59e0b;
--ion-color-danger: #ef4444;
--ion-font-family: 'Inter', system-ui, sans-serif;
}
/* Dark mode — Ionic auto-detects system preference */
@media (prefers-color-scheme: dark) {
:root {
--ion-background-color: #0f172a;
--ion-text-color: #e2e8f0;
--ion-card-background: #1e293b;
}
}
```
## Installation
```bash
npm install -g @ionic/cli
npm install @ionic/react @ionic/react-router
npm install @capacitor/core @capacitor/cli
npm install @capacitor/camera @capacitor/geolocation # Per-plugin
```
## Examples
### Example 1: Setting up Ionic with a custom configuration
**User request:**
```
I just installed Ionic. Help me configure it for my TypeScript + React workflow with my preferred keybindings.
```
The agent creates the configuration file with TypeScript-aware settings, configures relevant plugins/extensions for React development, sets up keyboard shortcuts matching the user's preferences, and verifies the setup works correctly.
### Example 2: Extending Ionic with custom functionality
**User request:**
```
I want to add a custom ui components to Ionic. How do I build one?
```
The agent scaffolds the extension/plugin project, implements the core functionality following Ionic's API patterns, adds configuration options, and provides testing instructions to verify it works end-to-end.
## Guidelines
1. **Capacitor over Cordova** — Capacitor is Ionic's modern native runtime; it supports any web framework and has better plugin ecosystem
2. **Platform-adaptive components** — Ionic components auto-adapt to iOS/Android look; don't override platform styles unless necessary
3. **Lazy load pages** — Use React.lazy or Angular lazy modules for each page; keeps initial bundle small
4. **Test in browser first** — Develop and debug with `ionic serve`; only test on device for native features (camera, GPS)
5. **Use Ionic's CSS utilities** — Ionic includes padding, margin, text alignment utilities; avoid writing custom CSS for spacing
6. **Progressive Web App first** — Ionic apps are PWAs by default; test the web version before adding native platforms
7. **Capacitor plugins for native** — Always use Capacitor plugins over direct Cordova plugins; they have better TypeScript support
8. **Live reload on device** — `ionic cap run ios --livereload --external` for instant feedback during native testingRelated Skills
monitoring-cross-chain-bridges
Monitor cross-chain bridge TVL, volume, fees, and transaction status across networks. Use when researching bridges, comparing routes, or tracking bridge transactions. Trigger with phrases like "monitor bridges", "compare bridge fees", "track bridge tx", "bridge TVL", or "cross-chain transfer status".
crossing-the-chasm
Navigate the technology adoption lifecycle from early adopters to mainstream market. Use when the user mentions "crossing the chasm", "beachhead segment", "whole product", "early adopters vs. mainstream", or "tech go-to-market". Covers D-Day analogy, bowling-pin strategy, and positioning against incumbents. For product positioning, see obviously-awesome. For new market creation, see blue-ocean-strategy. Trigger with 'crossing', 'the', 'chasm'.
cross-validation-setup
Cross Validation Setup - Auto-activating skill for ML Training. Triggers on: cross validation setup, cross validation setup Part of the ML Training skill category.
power-platform-mcp-connector-suite
Generate complete Power Platform custom connector with MCP integration for Copilot Studio - includes schema generation, troubleshooting, and validation
power-apps-code-app-scaffold
Scaffold a complete Power Apps Code App project with PAC CLI setup, SDK integration, and connector configuration
azure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development, configuring staticwebapp.config.json, adding Azure Functions APIs to SWA, or setting up GitHub Actions CI/CD for Static Web Apps.
migrating-dbt-project-across-platforms
Use when migrating a dbt project from one data platform or data warehouse to another (e.g., Snowflake to Databricks, Databricks to Snowflake) using dbt Fusion's real-time compilation to identify and fix SQL dialect differences.
developing-ios-apps
Develops iOS/macOS applications with XcodeGen, SwiftUI, and SPM. Handles Apple Developer signing, notarization, and CI/CD pipelines. Triggers on XcodeGen project.yml, SPM dependency issues, device deployment, code signing errors (Error -25294, keychain mismatch, adhoc fallback, EMFILE, notarization credential conflict, continueOnError), camera/AVFoundation debugging, iOS version compatibility, "Library not loaded @rpath", Electron @electron/osx-sign/@electron/notarize config, notarytool, GitHub Actions secrets in conditionals, or certificate/provisioning problems. Use when building iOS/macOS apps, fixing Xcode build failures, deploying to real devices, or configuring CI/CD signing pipelines.
sleek-design-mobile-apps
Use when the user wants to design a mobile app, create screens, build UI, or interact with their Sleek projects. Covers high-level requests ("design an app that does X") and specific ones ("list my projects", "create a new project", "screenshot that screen").
shopify-apps
Expert patterns for Shopify app development including Remix/React Router apps, embedded apps with App Bridge, webhook handling, GraphQL Admin API, Polaris components, billing, and app extensions. Use when: shopify app, shopify, embedded app, polaris, app bridge.
multi-platform-apps-multi-platform
Build and deploy the same feature consistently across web, mobile, and desktop platforms using API-first architecture and parallel implementation strategies.
hig-technologies
Apple HIG guidance for Apple technology integrations: Siri, Apple Pay, HealthKit, HomeKit, ARKit, machine learning, generative AI, iCloud, Sign in with Apple, SharePlay, CarPlay, Game Center, in-app purchase, NFC, Wallet, VoiceOver, Maps, Mac Catalyst, and more. Use when asked about: "Siri integration", "Apple Pay", "HealthKit", "HomeKit", "ARKit", "augmented reality", "machine learning", "generative AI", "iCloud sync", "Sign in with Apple", "SharePlay", "CarPlay", "in-app purchase", "NFC", "VoiceOver", "Maps", "Mac Catalyst". Also use when the user says "how do I integrate Siri," "what are the Apple Pay guidelines," "how should my AR experience work," "how do I use Sign in with Apple," or asks about any Apple framework or service integration. Cross-references: hig-inputs for input methods, hig-components-system for widgets.