DocsFrameworksReact and Next.js

React and Next.js

One component, no state and no effects, so it renders on the server too.

1 min readUpdated November 2026Fidgicons 1.0

npm install fidgicons
Status.jsxjsx
import 'fidgicons/css';
import { Fidgicon } from 'fidgicons/react';
import battery from 'fidgicons/icons/battery.js';
import bell from 'fidgicons/icons/bell.js';

export function Status({ level }) {
  return (
    <>
      <Fidgicon icon={battery} value={level / 100} aria-label={level + '% charged'} />
      <button className="fidg-hover">
        <Fidgicon icon={bell} /> Notify me
      </button>
    </>
  );
}

#Next.js

Import the stylesheet once in app/layout.js. The component renders a plain <svg>, so it works in server components and static export.

app/layout.jsjsx
import 'fidgicons/css';

export default function RootLayout({ children }) {
  return <html lang="en"><body>{children}</body></html>;
}

Let the CLI write them as modules into your project, then import them like the free ones.

npx fidgicons add lechon kalesa --out src/icons --js
import lechon from '@/icons/lechon.js';
<Fidgicon icon={lechon} hover />

All options are on the reference page. className and style are merged with the icon's own.

Something missing or unclear?Write to usRequest an icon