Tree-shakable
Every icon is a named export and the package has no side effects, so unused icons stay out of your build.
Install one npm package, import icons by name and ship only the ones you use.
Install
The package needs React 17 or newer and nothing else.
npm install @uixicons/reactimport { Home, Bell } from '@uixicons/react/stroke-regular-rounded';
export function Nav() {
return (
<nav>
<Home width={20} height={20} />
<Bell style={{ color: '#6301E4' }} />
</nav>
);
}Styles
Pick the style in the import path, and switching style is a one-word change.
| Style | Import from | Look |
|---|---|---|
| Regular Rounded | @uixicons/react/stroke-regular-rounded | Round ends and corners |
| Regular Sharp | @uixicons/react/stroke-regular-sharp | Square ends and sharp corners |
| Solid | @uixicons/react/solid | Filled shapes |
How it works
Every icon is a named export and the package has no side effects, so unused icons stay out of your build.
Each module ships its own type file. An icon is a normal React component that accepts SVG props.
Icons use currentColor. Set color in CSS or style and the icon follows the text around it.
Icons render as plain SVG, so server rendering and static export work without extra setup.
Free and Pro
Three styles are free
The package holds Regular Rounded, Regular Sharp and Solid under the MIT licence. Pro styles are not in the package. With a licence key you can copy any Pro icon as JSX from the icon browser.
FAQ
React 17 and newer. The package lists React as a peer dependency and uses only createElement, so it works with Next.js, Vite, Remix and any other React setup. It renders plain SVG, so server rendering and static export work without extra steps.
Colour follows the CSS color of the parent, and size comes from the width and height props. Because each icon is plain SVG you can also pass className and style. For the stroke styles you can set the stroke width in CSS to make a line lighter or heavier.
No. The npm package holds the free styles only: Regular Rounded, Regular Sharp and Solid. Pro icons are copied from the icon browser as JSX with your licence key and pasted into your code, so the package stays small and fully MIT licensed.
Not yet. Vue and Svelte packages are on the list. Today you can open any icon in the icon browser and copy it as a Vue or Svelte component, or use the plain SVG files, which work in any framework and any build tool.
Search the library, copy the code you need and drop it into your project.