Skip to main content

Components

API reference for all icon components.

Icon Componentsโ€‹

rn-iconify exports 200+ icon set components. Each component renders icons from its specific icon set.

Common Propsโ€‹

All icon components accept these props:

interface IconProps {
/** Icon name (required) */
name: string;

/** Icon size in pixels (sets both width and height) */
size?: number;

/** Icon width in pixels (overrides size) */
width?: number;

/** Icon height in pixels (overrides size) */
height?: number;

/** Icon color */
color?: string;

/** Rotation angle */
rotate?: 0 | 90 | 180 | 270;

/** Flip direction */
flip?: 'horizontal' | 'vertical' | 'both';

/**
* Fallback component shown while loading
* @deprecated Use `placeholder` instead for animated placeholders
*/
fallback?: ReactNode;

/** Delay before showing fallback (ms) */
fallbackDelay?: number;

/** Placeholder while loading */
placeholder?: ReactNode | 'skeleton' | 'pulse' | 'shimmer';

/** Placeholder background color */
placeholderColor?: string;

/** Placeholder animation duration (ms) */
placeholderDuration?: number;

/** Additional styles */
style?: StyleProp<ViewStyle>;

/**
* NativeWind/Tailwind CSS class names
* Only works in projects with NativeWind configured
*/
className?: string;

/** Called when icon loads */
onLoad?: () => void;

/** Called on load error */
onError?: (error: Error) => void;

/** Accessibility label */
accessibilityLabel?: string;

/** Test identifier */
testID?: string;

// Press/Touch props

/** Called when icon is pressed (wraps icon in Pressable) */
onPress?: () => void;

/** Called when icon is long pressed */
onLongPress?: () => void;

/** Called when press starts */
onPressIn?: () => void;

/** Called when press ends */
onPressOut?: () => void;

/** Whether press is disabled */
disabled?: boolean;

/** Style applied when icon is pressed */
pressedStyle?: StyleProp<ViewStyle>;

// Animation props (can also use AnimatedIcon wrapper)

/** Animation type or configuration */
animate?: 'spin' | 'pulse' | 'bounce' | 'shake' | 'ping' | 'wiggle' | AnimationConfig;

/** Animation duration override (ms) */
animationDuration?: number;

/** Animation loop override */
animationLoop?: boolean;

/** Animation easing function */
animationEasing?: 'linear' | 'ease' | 'ease-in' | 'ease-out' | 'ease-in-out' | 'bounce' | EasingFunction;

/** Delay before animation starts (ms) */
animationDelay?: number;

/** Auto-start animation */
autoPlay?: boolean;

/** Called when animation completes */
onAnimationComplete?: () => void;
}
info

Animation props can be used directly on icon components, or you can use the AnimatedIcon wrapper for more control. See Animations for details.

Default Valuesโ€‹

PropDefault
size24
color'#000000'
rotate0
flipundefined
placeholderundefined
placeholderColor'#E1E1E1'
placeholderDuration1000
fallbackDelay0
classNameundefined
onPressundefined
disabledfalse
pressedStyleundefined
animateundefined
animationDelay0
autoPlaytrue

Pressable Iconsโ€‹

When onPress or onLongPress is provided, the icon is automatically wrapped in a Pressable component:

import { Mdi } from 'rn-iconify';

// Simple press handler
<Mdi name="close" size={24} onPress={() => console.log('pressed')} />

// With pressed style feedback
<Mdi
name="settings"
size={24}
onPress={() => navigation.navigate('Settings')}
pressedStyle={{ opacity: 0.5, transform: [{ scale: 0.95 }] }}
/>

// Disabled state
<Mdi
name="trash"
size={24}
onPress={handleDelete}
disabled={!canDelete}
/>

NativeWind Supportโ€‹

Icons support className prop for NativeWind/Tailwind CSS styling:

import { Mdi } from 'rn-iconify';

// Requires NativeWind to be configured in your project
<Mdi name="home" className="w-6 h-6 text-blue-500" />
note

The className prop only works in projects with NativeWind properly configured.


Mdiโ€‹

Material Design Icons - 7,447 icons

import { Mdi, type MdiIconName } from 'rn-iconify';

<Mdi name="home" size={24} color="blue" />

Propsโ€‹

interface MdiProps extends IconProps {
name: MdiIconName;
}

Exampleโ€‹

<Mdi name="home" />
<Mdi name="settings" size={32} />
<Mdi name="heart" color="red" />
<Mdi name="arrow-right" rotate={90} />
<Mdi name="star" placeholder="shimmer" />

Heroiconsโ€‹

Heroicons by Tailwind CSS - 1,288 icons

import { Heroicons, type HeroiconsIconName } from 'rn-iconify';

<Heroicons name="user" size={24} color="blue" />

Propsโ€‹

interface HeroiconsProps extends IconProps {
name: HeroiconsIconName;
}

Exampleโ€‹

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

Lucideโ€‹

Lucide Icons - 1,650 icons

import { Lucide, type LucideIconName } from 'rn-iconify';

<Lucide name="camera" size={24} />

Propsโ€‹

interface LucideProps extends IconProps {
name: LucideIconName;
}

Exampleโ€‹

<Lucide name="home" />
<Lucide name="settings" size={32} />
<Lucide name="user" color="#6366f1" />

Ph (Phosphor)โ€‹

Phosphor Icons - 9,072 icons

import { Ph, type PhIconName } from 'rn-iconify';

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

Propsโ€‹

interface PhProps extends IconProps {
name: PhIconName;
}

Exampleโ€‹

<Ph name="house" />
<Ph name="gear" size={32} />
<Ph name="user" color="purple" />

Tablerโ€‹

Tabler Icons - 5,963 icons

import { Tabler, type TablerIconName } from 'rn-iconify';

<Tabler name="home" size={24} />

Featherโ€‹

Feather Icons - 286 icons

import { Feather, type FeatherIconName } from 'rn-iconify';

<Feather name="home" size={24} />

Bi (Bootstrap)โ€‹

Bootstrap Icons - 2,078 icons

import { Bi, type BiIconName } from 'rn-iconify';

<Bi name="house" size={24} />

Fa6Solidโ€‹

Font Awesome 6 Solid - 1,402 icons

import { Fa6Solid, type Fa6SolidIconName } from 'rn-iconify';

<Fa6Solid name="house" size={24} />

Fa6Regularโ€‹

Font Awesome 6 Regular - 163 icons

import { Fa6Regular, type Fa6RegularIconName } from 'rn-iconify';

<Fa6Regular name="circle" size={24} />

Fa6Brandsโ€‹

Font Awesome 6 Brands - 494 icons

import { Fa6Brands, type Fa6BrandsIconName } from 'rn-iconify';

<Fa6Brands name="github" size={24} />

Ionโ€‹

Ionicons - 1,356 icons

import { Ion, type IonIconName } from 'rn-iconify';

<Ion name="home" size={24} />

Ri (Remix)โ€‹

Remix Icon - 2,860 icons

import { Ri, type RiIconName } from 'rn-iconify';

<Ri name="home-line" size={24} />

Complete Listโ€‹

All 200+ icon set components follow the same pattern:

ComponentPrefixIconsImport
Mdimdi7,447import { Mdi } from 'rn-iconify'
Heroiconsheroicons1,288import { Heroicons } from 'rn-iconify'
Lucidelucide1,650import { Lucide } from 'rn-iconify'
Phph9,072import { Ph } from 'rn-iconify'
Tablertabler5,963import { Tabler } from 'rn-iconify'
Featherfeather286import { Feather } from 'rn-iconify'
Bibi2,078import { Bi } from 'rn-iconify'
Fa6Solidfa6-solid1,402import { Fa6Solid } from 'rn-iconify'

See Icon Sets for the complete list.


IconThemeProviderโ€‹

Provides global defaults for all icon components.

import { IconThemeProvider } from 'rn-iconify';

<IconThemeProvider theme={theme}>
{children}
</IconThemeProvider>

Propsโ€‹

interface IconThemeProviderProps {
/** Theme configuration */
theme: IconTheme;

/** Child components */
children: ReactNode;
}

interface IconTheme {
/** Default size */
size?: number;

/** Default color */
color?: string;

/** Default placeholder */
placeholder?: ReactNode | 'skeleton' | 'pulse' | 'shimmer';

/** Placeholder background color */
placeholderColor?: string;

/** Placeholder animation duration (ms) */
placeholderDuration?: number;

/** Default rotation */
rotate?: 0 | 90 | 180 | 270;

/** Default flip direction */
flip?: 'horizontal' | 'vertical' | 'both';

/** Delay before showing fallback (ms) */
fallbackDelay?: number;
}

Exampleโ€‹

<IconThemeProvider
theme={{
size: 24,
color: '#333',
placeholder: 'shimmer',
}}
>
<App />
</IconThemeProvider>

Generic Icon Componentโ€‹

For dynamic icon rendering across sets:

import { Icon } from 'rn-iconify';

<Icon name="mdi:home" size={24} />
<Icon name="heroicons:user" size={24} />

Propsโ€‹

interface GenericIconProps extends IconProps {
/** Full icon name with prefix (e.g., "mdi:home") */
name: string;
}

Exampleโ€‹

const iconName = 'mdi:home'; // Dynamic

<Icon name={iconName} size={24} color="blue" />

AnimatedIconโ€‹

Wrapper component for adding animations to icons.

import { AnimatedIcon } from 'rn-iconify';
import { Mdi } from 'rn-iconify';

<AnimatedIcon animate="spin">
<Mdi name="loading" size={24} />
</AnimatedIcon>

<AnimatedIcon animate="pulse" autoPlay={true}>
<Mdi name="heart" size={24} color="red" />
</AnimatedIcon>

AnimatedIcon Propsโ€‹

PropTypeDefaultDescription
childrenReactNoderequiredIcon element to animate
animateAnimationPreset | AnimationConfig-Animation to apply
animationDurationnumbervariesDuration override (ms)
animationLoopbooleanvariesLoop override
animationEasingAnimationEasingvariesEasing override
animationDelaynumber0Delay before start (ms)
autoPlaybooleantrueAuto-start animation
onAnimationComplete() => void-Callback on completion
widthnumber-Width of container
heightnumber-Height of container
testIDstring-Test ID for testing

Animation Presetsโ€‹

PresetEffectDurationLoops
spin360ยฐ rotation1000msYes
pulseOpacity fade1500msYes
bounceScale bounce600msYes
shakeHorizontal shake500msNo
pingExpand effect1000msYes
wiggleRotate ยฑ15ยฐ300msNo

Ref Supportโ€‹

AnimatedIcon supports ref forwarding for programmatic animation control.

import { useRef } from 'react';
import { AnimatedIcon, type AnimationControls } from 'rn-iconify';
import { Mdi } from 'rn-iconify';

function ControlledAnimation() {
const animationRef = useRef<AnimationControls>(null);

return (
<>
<AnimatedIcon ref={animationRef} animate="spin" autoPlay={false}>
<Mdi name="loading" size={24} />
</AnimatedIcon>

<Button onPress={() => animationRef.current?.start()} title="Start" />
<Button onPress={() => animationRef.current?.stop()} title="Stop" />
</>
);
}

AnimationControls (Ref Type)โ€‹

PropertyTypeDescription
start()() => voidStart the animation
stop()() => voidStop the animation
pause()() => voidPause the animation
resume()() => voidResume a paused animation
reset()() => voidReset to initial state
stateAnimationState'idle' | 'running' | 'paused' | 'completed'
isAnimatingbooleanWhether animation is currently running

IconAliasProviderโ€‹

Provider component for icon aliases.

import { IconAliasProvider, Icon } from 'rn-iconify';

const aliases = {
home: 'mdi:home',
user: 'heroicons:user',
settings: 'mdi:cog',
} as const;

function App() {
return (
<IconAliasProvider aliases={aliases}>
<Icon name="home" size={24} />
<Icon name="user" size={24} />
</IconAliasProvider>
);
}

IconAliasProvider Propsโ€‹

PropTypeDefaultDescription
aliasesRecord<string, string>requiredAlias name to icon name mappings
extendbooleantrueWhether to inherit parent aliases
childrenReactNoderequiredChild components

AccessibilityProviderโ€‹

Provider component for accessibility configuration.

import { AccessibilityProvider, Mdi } from 'rn-iconify';

function App() {
return (
<AccessibilityProvider
config={{
autoLabels: true,
respectReducedMotion: true,
minTouchTargetSize: 44,
}}
>
<Mdi name="home" size={24} />
</AccessibilityProvider>
);
}

AccessibilityProvider Propsโ€‹

PropTypeDefaultDescription
configAccessibilityConfig{}Accessibility configuration (optional)
childrenReactNoderequiredChild components
info

The config prop is optional. When not provided or partially provided, default values are used for any missing options.

AccessibilityConfig Optionsโ€‹

OptionTypeDefaultDescription
autoLabelsbooleantrueAuto-generate accessibility labels
labelGenerator(name: string) => stringdefaultLabelGeneratorCustom label generator
highContrastbooleanfalseEnable high contrast mode
respectReducedMotionbooleantrueRespect reduced motion preference
defaultRoleAccessibilityRole'image'Default accessibility role
showFocusIndicatorsbooleantrueShow focus indicators
minTouchTargetSizenumber44Minimum touch target size

IconExplorerโ€‹

Development tool for browsing and testing icons.

import { IconExplorer } from 'rn-iconify';

function DevScreen() {
return (
<IconExplorer
visible={true}
onClose={() => console.log('Closed')}
onIconSelect={(name) => console.log('Selected:', name)}
/>
);
}

IconExplorer Propsโ€‹

PropTypeDefaultDescription
visiblebooleantrueWhether explorer is visible
onClose() => void-Callback when closed
iconSetsstring[][]Icon sets to include (empty = all)
initialQuerystring''Initial search query
maxResultsnumber100Maximum search results
previewPartial<PreviewConfig>-Preview configuration (sizes, colors, etc.)
onIconSelect(name: string) => void-Callback when icon selected
onCopyCode(code: string) => void-Callback when code copied
keyboardShortcutsbooleantrueEnable keyboard shortcuts
styleobject-Custom container styles

Placeholder Componentsโ€‹

rn-iconify provides three built-in placeholder components for loading states, plus a factory component.

PlaceholderFactoryโ€‹

Factory component that renders the appropriate placeholder based on type.

import { PlaceholderFactory } from 'rn-iconify';

<PlaceholderFactory
type="shimmer"
width={24}
height={24}
color="#E1E1E1"
/>

PlaceholderFactory Propsโ€‹

PropTypeDefaultDescription
typePlaceholderTyperequiredPlaceholder type: 'skeleton', 'pulse', 'shimmer', or custom ReactNode
widthnumberrequiredWidth of the placeholder
heightnumberrequiredHeight of the placeholder
colorstring'#E1E1E1'Background color
highlightColorstring'#F5F5F5'Secondary color (for shimmer gradient)
durationnumber1000Animation duration (ms)
borderRadiusnumber4Border radius
testIDstring-Test ID for testing

Skeletonโ€‹

Simple static placeholder with no animation.

import { Skeleton } from 'rn-iconify';

<Skeleton width={24} height={24} color="#E1E1E1" />

Skeleton Propsโ€‹

PropTypeDefaultDescription
widthnumberrequiredWidth of the placeholder
heightnumberrequiredHeight of the placeholder
colorstring'#E1E1E1'Background color
borderRadiusnumber4Border radius
testIDstring-Test ID for testing

Pulseโ€‹

Animated placeholder with opacity fade effect.

import { Pulse } from 'rn-iconify';

<Pulse
width={24}
height={24}
color="#E1E1E1"
duration={1500}
/>

Pulse Propsโ€‹

PropTypeDefaultDescription
widthnumberrequiredWidth of the placeholder
heightnumberrequiredHeight of the placeholder
colorstring'#E1E1E1'Background color
durationnumber1000Animation cycle duration (ms)
borderRadiusnumber4Border radius
testIDstring-Test ID for testing

Shimmerโ€‹

Animated placeholder with gradient sweep effect.

import { Shimmer } from 'rn-iconify';

<Shimmer
width={24}
height={24}
color="#E1E1E1"
highlightColor="#F5F5F5"
duration={1000}
/>

Shimmer Propsโ€‹

PropTypeDefaultDescription
widthnumberrequiredWidth of the placeholder
heightnumberrequiredHeight of the placeholder
colorstring'#E1E1E1'Base background color
highlightColorstring'#F5F5F5'Gradient highlight color
durationnumber1000Animation cycle duration (ms)
borderRadiusnumber4Border radius
testIDstring-Test ID for testing

Usage with Iconsโ€‹

import { Mdi } from 'rn-iconify';

// Using placeholder prop directly
<Mdi name="home" size={24} placeholder="shimmer" />
<Mdi name="user" size={24} placeholder="pulse" />
<Mdi name="settings" size={24} placeholder="skeleton" />

// Custom placeholder component
<Mdi
name="heart"
size={32}
placeholder={<MyCustomPlaceholder />}
/>