Installation
npm install @airqo/icons-reactFor Vue usage, install @airqo/icons-vue instead.
Quick Start
Import icons directly from the package. The icons are named with anAqprefix followed by the icon name in PascalCase.
import { AqHome01 } from '@airqo/icons-react';
export default function App() {
return (
<AqHome01
size={24}
color="#0284C7"
/>
);
}Styling
Icons inherit the current text color by default, but you can customize them using props or CSS classes (Tailwind).
Using Props
<AqHome01 size={32} color="#DC2626" />Directly set size (number) and color (hex/rgb string).
Using Tailwind
<AqHome01 className="w-8 h-8 text-red-600" />Apply utility classes via the className prop.
API Reference
All icons accept these common props, extending standard SVG attributes:
TypeScript Interface
interface IconProps extends React.SVGProps<SVGSVGElement> {
size?: number | string; // Icon size (default: 24)
className?: string; // CSS classes
color?: string; // Icon color (default: currentColor)
// ... all standard SVG props (onClick, onMouseOver, etc.)
}| Prop | Type | Default | Description |
|---|---|---|---|
| size | number | string | 24 | Sets the width and height of the icon. |
| color | string | currentColor | Sets the fill/stroke color of the icon. |
| className | string | - | Applies custom CSS classes. |
| ...props | SVGProps | - | All standard SVG attributes are supported. |
Tree-shaking ensures only imported icons are bundled, keeping your app lightweight across all frameworks.
🔧 TypeScript Support
Full TypeScript support is built-in. Leverage types for props and create type-safe components.
Type-safe Component Usage
import type { ComponentProps } from 'react';
import { AqHome01 } from '@airqo/icons-react';
// Type for icon props
type IconProps = ComponentProps<typeof AqHome01>;
// Type-safe custom component
interface ButtonWithIconProps {
icon: React.ComponentType<ComponentProps<'svg'>>; // Accept any icon component
children: React.ReactNode;
}
function ButtonWithIcon({ icon: Icon, children }: ButtonWithIconProps) {
return (
<button className="flex items-center space-x-2 p-2 hover:bg-gray-100 rounded">
<Icon size={20} />
<span>{children}</span>
</button>
);
}
// Usage
<ButtonWithIcon icon={AqHome01}>Home</ButtonWithIcon>Interface Definition
interface IconProps extends React.SVGProps<SVGSVGElement> {
size?: number | string; // Icon size (default: 24)
className?: string; // CSS classes
color?: string; // Icon color (default: currentColor)
// ... all standard SVG props (onClick, onMouseOver, etc.)
}Dynamic Icon Selection with Types
import { AqHome01, AqUser01, AqSettings01 } from '@airqo/icons-react';
import type { ComponentProps } from 'react';
type IconName = 'home' | 'user' | 'settings';
const iconMap: Record<IconName, React.ComponentType<ComponentProps<'svg'>>> = {
home: AqHome01,
user: AqUser01,
settings: AqSettings01,
};
interface DynamicIconProps extends ComponentProps<'svg'> {
name: IconName;
}
function DynamicIcon({ name, ...props }: DynamicIconProps) {
const IconComponent = iconMap[name];
if (!IconComponent) {
console.warn(`Icon '${name}' not found`);
return null; // Or a fallback icon
}
return <IconComponent {...props} />;
}
// Usage
<DynamicIcon name="home" size={24} />
<DynamicIcon name="user" size={20} className="text-blue-500" />📱 Flutter Package
AirQo Icons provides native Flutter widgets with full platform support (Android, iOS, Linux, macOS, Web, Windows).
Installation
Add to pubspec.yaml:
dependencies:
airqo_icons_flutter: ^1.0.1Install dependencies:
flutter pub getBasic Usage
import 'package:airqo_icons_flutter/airqo_icons_flutter.dart';
class MyWidget extends StatelessWidget {
Widget build(BuildContext context) {
return Row(
children: [
AqUganda(size: 32, color: Colors.green),
AqHome01(size: 24, color: Colors.blue),
AqBarChart01(size: 28, color: Colors.purple),
],
);
}
}API Reference
All icons accept these parameters:
Widget AqIconWidget({
Key? key, // Widget key
double size = 24.0, // Icon size (default: 24.0)
Color? color, // Icon color (uses SVG default if null)
String? semanticLabel, // Accessibility label
})Advanced Examples
Material Design Integration
// In App Bar
AppBar(
leading: AqMenu01(color: Colors.white),
title: Text('AirQo Dashboard'),
actions: [
IconButton(
icon: AqNotificationSquare(color: Colors.white),
onPressed: () => _showNotifications(),
),
],
)
// In Bottom Navigation
BottomNavigationBar(
items: [
BottomNavigationBarItem(
icon: AqHome01(),
label: 'Home',
),
BottomNavigationBarItem(
icon: AqBarChart01(),
label: 'Analytics',
),
BottomNavigationBarItem(
icon: AqUser01(),
label: 'Profile',
),
],
)Responsive Icons
class ResponsiveIcon extends StatelessWidget {
Widget build(BuildContext context) {
final screenWidth = MediaQuery.of(context).size.width;
final iconSize = screenWidth > 600 ? 32.0 : 24.0;
return AqHome01(
size: iconSize,
color: Theme.of(context).primaryColor,
);
}
}Accessibility Support
// Provide semantic labels for screen readers
AqHome01(
semanticLabel: 'Navigate to home screen',
)
// Use in semantic widgets
Semantics(
button: true,
hint: 'Tap to open settings',
child: GestureDetector(
onTap: _openSettings,
child: AqSettings01(),
),
)🎨 Vue Package
AirQo Icons provides components for Vue 3 users. Ensure your project uses Vue 3.
Installation
npm install @airqo/icons-vue
# or
yarn add @airqo/icons-vueBasic Usage
<template>
<div class="icon-wrapper">
<AqHome01 />
<!-- With custom props -->
<AqCloud01 :size="32" color="#1652DA" />
</div>
</template>
<script setup>
import { AqHome01, AqCloud01 } from '@airqo/icons-vue';
</script>Props Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| size | Number | String | 24 | Width and height of the icon |
| color | String | "currentColor" | Fill color (accepts hex, rgb, or CSS color names) |
| class | String | - | CSS classes |
🛠Utilities
Helper functions and utilities for working with AirQo Icons across different frameworks.
React Hooks
The react package exports specific hooks for easier integration.
import { useIconSize } from '@airqo/icons-react';
function MyComponent() {
const { size, isSmall, isLarge } = useIconSize('md');
// ...
}SVG Optimization
All icons are pre-optimized using SVGO to ensure minimal bundle size impact. The build process includes:
- Removal of unnecessary metadata
- Path optimization and simplification
- Consistent viewBox standardization (24x24)
- Color attribute normalization (currentColor)
Contributing
To contribute new icons or fix existing ones:
- Add raw SVG files to
svg/directory - Run the generation script:
npm run generate - Verify the output in respective package folders
- Submit a PR with the changes

Google.org Leaders to Watch 2022
From expanding equity in education to addressing environmental issues, this year's Leaders to Watch are building a better future for everyone.
Learn more →