CO

Core

@svgr/core

Transform SVG into React Components.

Icons
svgr
svg
react
core
api
@svgr/core
Icons
javascript
npm
frontend
Stars
1.0k
Weekly
15M
Open issues
13
Bundle
~15 kB

Installation

npm install @svgr/core

Code example

import { Star } from "@svgr/core";

export function Example() {
  return <Star size={24} />;
}

Pros & cons

Pros

  • Actively maintained by Greg Bergé
  • 15M weekly downloads. Battle tested
  • First-class TypeScript definitions
  • MIT licensed

Considerations

  • Adds roughly ~15 kB to your bundle
  • Needs client-only rendering in SSR frameworks
  • Not supported in React Native
  • 13 open issues on GitHub

FAQs

Alternatives & similar libraries