Skip to main content

Quick Start

Get up and running with rn-iconify in 5 minutes.

Basic Usageโ€‹

Import any icon set component and use it:

import { Mdi, Heroicons, Lucide, Ph } from 'rn-iconify';

function MyComponent() {
return (
<>
<Mdi name="home" size={24} color="blue" />
<Heroicons name="user" size={24} color="red" />
<Lucide name="camera" size={24} />
<Ph name="house" size={24} color="#6366f1" />
</>
);
}

Available Propsโ€‹

PropTypeDefaultDescription
namestringrequiredIcon name (with autocomplete)
sizenumber24Icon width and height
colorstring'#000000'Icon color
rotatenumber0Rotation angle in degrees (any value accepted)
flip'horizontal' | 'vertical' | 'both'-Flip direction
styleViewStyle-Additional styles

Material Design Icons (Mdi)โ€‹

The most comprehensive icon set with 7,447+ icons.

import { Mdi } from 'rn-iconify';

<Mdi name="home" size={24} />
<Mdi name="settings" size={24} />
<Mdi name="account" size={24} />
<Mdi name="heart" size={24} color="red" />

Heroiconsโ€‹

Beautiful hand-crafted icons by the makers of Tailwind CSS.

import { Heroicons } from 'rn-iconify';

<Heroicons name="home" size={24} />
<Heroicons name="user" size={24} />
<Heroicons name="cog-6-tooth" size={24} />

Lucideโ€‹

Community-driven fork of Feather Icons.

import { Lucide } from 'rn-iconify';

<Lucide name="house" size={24} />
<Lucide name="settings" size={24} />
<Lucide name="user" size={24} />

Phosphor (Ph)โ€‹

Flexible icon family with 9,072 icons.

import { Ph } from 'rn-iconify';

<Ph name="house" size={24} />
<Ph name="gear" size={24} />
<Ph name="user" size={24} />

Rotation & Flipโ€‹

Transform icons with rotation and flip:

import { Mdi } from 'rn-iconify';

// Rotation
<Mdi name="arrow-right" rotate={90} /> // Points down
<Mdi name="arrow-right" rotate={180} /> // Points left
<Mdi name="arrow-right" rotate={270} /> // Points up

// Flip
<Mdi name="arrow-right" flip="horizontal" /> // Mirror horizontally
<Mdi name="arrow-right" flip="vertical" /> // Mirror vertically
<Mdi name="arrow-right" flip="both" /> // Mirror both
tip

The rotate prop accepts any degree value, not just multiples of 90. For example, rotate={45} produces a 45-degree diagonal rotation.

Loading Statesโ€‹

Show placeholders while icons load:

import { Mdi } from 'rn-iconify';

// Built-in presets
<Mdi name="home" placeholder="skeleton" /> // Gray box
<Mdi name="home" placeholder="pulse" /> // Fading animation
<Mdi name="home" placeholder="shimmer" /> // Gradient sweep

// Custom placeholder
<Mdi
name="home"
placeholder={<ActivityIndicator size="small" />}
/>

Prefetchingโ€‹

Preload icons for instant rendering:

import { prefetchIcons } from 'rn-iconify';

async function initApp() {
// Prefetch commonly used icons
await prefetchIcons([
'mdi:home',
'mdi:settings',
'mdi:account',
'heroicons:user',
]);
}

Finding Iconsโ€‹

Browse icons at Iconify Design:

  1. Search for an icon (e.g., "home")
  2. Note the icon set prefix (e.g., mdi)
  3. Note the icon name (e.g., home)
  4. Use it: <Mdi name="home" />

Or use our Icon Browser to search all 268,000+ icons.

Next Stepsโ€‹