@mingcute/react
v1.4.1
Published
MingCute Icons for React
Readme
MingCute Icons for React
Installation
npm install @mingcute/react
# or
yarn add @mingcute/react
# or
pnpm add @mingcute/reactUsage
Basic Usage
Import icons from @mingcute/react.
import { MingcuteFill, Home1Line, SearchLine } from '@mingcute/react';
function App() {
return (
<div>
{/* Default: 24px size and currentColor */}
<MingcuteFill />
{/* Custom size and color */}
<Home1Line size={32} color="#007AFF" />
{/* Inherits standard SVG props */}
<SearchLine opacity={0.5} />
</div>
);
}Props
All icons accept standard SVG attributes and the following optional props:
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| size | number \| string | 24 | The size of the icon (width and height). |
| color | string | currentColor | The color of the icon. |
Color Control
You can control the icon color using the color prop or CSS color property.
The icons use currentColor by default, so they will inherit the text color of their parent element.
// Use color prop
<MingcuteFill color="red" />
// Use CSS inheritance
<div style={{ color: 'blue' }}>
<MingcuteFill />
</div>