1.2.0 • Published 1 year ago

@pplancq/svg-react v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

@pplancq/svg-react

A React component designed to load SVG files efficiently

Install

npm install @pplancq/svg-react

Use on your React application

import { Svg } from '@pplancq/svg-react';
import mySvg from './my-svg.svg';

export const App = () => {
  return <Svg src={mySvg} alt="mySvg" fill="red" />;
}

User guide

This SVG component is designed to be as flexible and customisable as a basic SVG component. It inherits all the props of a standard SVG component, allowing you to use it in the same way as you would a native SVG component.

Props

Prop nameDescriptionRequiredExemple value
srcThe URL or path of the SVG file to be loaded.yeshttps://my-domain/my-svg.svg
altAn alternative text description if the SVG image fails to loadmy-svg
1.2.0

1 year ago

1.0.2

1 year ago

1.1.0

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago