DOCS · 01 / 07NPM PNPM YARN BUN APP.TSX
Installation
Add mochi-icons to a React project and check that it works.
What you need
- A React project using React 18 or newer.
- Any modern setup works: Next.js, Vite, Remix, Astro with React, and others.
Install the package
Run one of these in your project folder. Use the one that matches your package manager.
npm install mochi-iconspnpm add mochi-iconsyarn add mochi-iconsbun add mochi-iconsCheck that it works
Put this in any component and open the page. You should see a camera.
import { CameraIcon } from "mochi-icons/CameraIcon";
export default function App() {
return <CameraIcon size={48} />;
}What's next
- Browse the library to find an icon and copy its code.
- Read React usage to learn the props.