# gregberge/svgr

Transform SVGs into React components 🦁

Repository: https://github.com/gregberge/svgr
Canonical: https://ross.abutalabs.com/products/svgr
Homepage: https://react-svgr.com
Language: TypeScript
License: MIT
License Family: permissive
Topics: svg2react, svg-to-react, svg, svgo, react, react-svg, react-svg-creator, svg-react, webpack-loader, webpack, inline-svg, react-svg-loader, loader, react-native
Last push: 2026-03-01T18:35:20+00:00

## Health v2 (maintenance only)
Score: 54/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 70, release rhythm 8, longevity 100
- inputs: {"age_days": 3288, "days_push": 185, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 11055, forks 442 (observed 2026-08-28T04:10:45.973289+00:00)

## What it is
SVGR is a universal tool that transforms SVG files into ready-to-use React components, with an optimizer powered by SVGO. It is available as a CLI, Node.js API, webpack loader, and online playground, and is used by tools like Next.js, Create React App, and WordPress.

## Use cases
- convert svg files to react components
- import svg icons as react components in next.js
- optimize and inline svgs in a webpack build
- bulk transform an icon set into a react component library
- replace svg fill colors with currentcolor for theming
- use svgs in react native

## When to choose
- you use React or React Native and want SVGs as components
- you need automated, repeatable SVG-to-component conversion in a build pipeline
- you want SVGO optimization and attribute customization built in

## When to avoid
- you use a framework other than React
- you just need to display a static SVG image without component conversion
- you need runtime SVG manipulation rather than build-time transformation

## Facets
- artifact type: library
- maturity: active
- function: build-tool, cli, frontend-framework, ui-components, image-processing, plugin-system
- domain: web-development, frontend, developer-tools, graphics
- platform: cli, cross-platform
- tags: svg, react, webpack-loader, svgo, code-generation, icons, react-native, nodejs, web

## Member repositories
- gregberge/svgr (main) score 54

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:45.973289+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:16:50.432049+00:00, confidence not recorded.
  - readme: https://github.com/gregberge/svgr (fetched 2026-08-28T04:10:45.973289+00:00, sha 31283a2d8183)
  - homepage: https://react-svgr.com (fetched 2026-08-29T08:15:58.412877+00:00, sha 416d37d0c48f)
  - site_page: https://react-svgr.com/docs (fetched 2026-08-29T08:15:58.421984+00:00, sha fe513c2db48c)
  - site_page: https://react-svgr.com/docs/getting-started (fetched 2026-08-29T08:15:58.423852+00:00, sha 172b6c374395)
- Data as of 2026-08-30T08:39:29.467469+00:00.
