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
npm install mochi-icons
PNPM
pnpm add mochi-icons
YARN
yarn add mochi-icons
BUN
bun add mochi-icons
Check that it works
Put this in any component and open the page. You should see a camera.
APP.TSX
import { CameraIcon } from "mochi-icons/CameraIcon";
export default function App() {
return <CameraIcon size={48} />;
}
Icon families
Icon families are called crafts. Sticker is available now and is the default for package imports. Pixels (pixels) is also available. Import its camera from mochi-icons/pixels/CameraPixelIcon as CameraPixelIcon.
Each family has its own library. Browse Sticker or Pixels to explore their icons.