React Native wrapper for MingCute icons. This package provides a simple, type-safe way to use MingCute icons in your React Native applications.
pnpm add @dzeta-tech/mingcute-react-native react-native-svg react-native-svg-transformerOr with npm:
npm install @dzeta-tech/mingcute-react-native react-native-svg react-native-svg-transformer --save-devOr with yarn:
yarn add @dzeta-tech/mingcute-react-native react-native-svg
yarn add react-native-svg-transformer --devreact>= 16.8.0react-native>= 0.60.0react-native-svg>= 12.0.0
Add the transformer to your metro.config.js:
const { getDefaultConfig } = require('expo/metro-config');
const config = getDefaultConfig(__dirname);
config.transformer = {
...config.transformer,
babelTransformerPath: require.resolve('react-native-svg-transformer'),
};
config.resolver = {
...config.resolver,
assetExts: config.resolver.assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...config.resolver.sourceExts, 'svg'],
};
module.exports = config;Or if you're using plain React Native (not Expo):
const { getDefaultConfig, mergeConfig } = require('@react-native/metro-config');
const defaultConfig = getDefaultConfig(__dirname);
const { assetExts, sourceExts } = defaultConfig.resolver;
const config = {
transformer: {
babelTransformerPath: require.resolve('react-native-svg-transformer'),
},
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg'],
},
};
module.exports = mergeConfig(defaultConfig, config);Import icons directly as React components:
import { Chat1Fill, MailLine, SearchFill } from '@dzeta-tech/mingcute-react-native';
// Basic usage
<Chat1Fill width={24} height={24} />
// With custom color
<MailLine width={32} height={32} fill="#007AFF" />
// All SVG props are supported
<SearchFill
width="100%"
height={24}
fill="red"
stroke="blue"
/>Icons are named using PascalCase based on their file names:
chat_1_fill.svg→Chat1Fillmail_line.svg→MailLinesearch_fill.svg→SearchFill
This package includes full TypeScript support:
import { Chat1Fill, IconName } from '@dzeta-tech/mingcute-react-native';
// Type-safe icon names
const iconName: IconName = 'chat_1_fill'; // ✅ Type-safeThis package includes 3000+ icons from the MingCute icon set. All icons are exported as individual components that you can import directly.
import {
Chat1Fill,
Chat1Line,
MailFill,
MailLine,
// ... and 3000+ more
} from '@dzeta-tech/mingcute-react-native';All icon components accept standard SVG props:
| Prop | Type | Description |
|---|---|---|
width |
number | string |
Icon width |
height |
number | string |
Icon height |
fill |
string |
Fill color |
stroke |
string |
Stroke color |
color |
string |
Color (alias for fill) |
... |
any |
All other SVG props are supported |
pnpm buildIcons are generated from the MingCute SVG files:
pnpm generate-iconsThis package is licensed under Apache-2.0, same as the original MingCute icon set.
Icons are from MingCute by Richard9394.