DOCS · START HEREQUICK START
Docs
Everything you need to install Mochi Icons and use them in a React app.
Start in one minute
- Install the package.
- Import an icon.
- Use it like any other component.
npm install mochi-icons
import { CameraIcon } from "mochi-icons/CameraIcon";
<CameraIcon size={48} />Not sure which icon you need? Browse the library and copy the code from there.
All pages
- 01InstallationAdd mochi-icons to a React project and check that it works.
- 02React usageImport an icon, place it in your JSX and set its size.
- 03StylingChange size, colour and stroke with props, CSS or Tailwind.
- 04AccessibilityWhen to hide an icon from screen readers and when to give it a name.
- 05TypeScriptUse the IconProps type and pass icons around as props.
- 06Direct importsImport one icon from its own file path.
- 07Tree-shakingWhy your app only ships the icons it uses.