{"repo":"gilbarbara/react-inlinesvg","free":true,"listed":false,"github":"https://github.com/gilbarbara/react-inlinesvg","clone":"git clone https://github.com/gilbarbara/react-inlinesvg.git","description":"An SVG loader component for ReactJS","language":"TypeScript","stars":1321,"topics":["react","svg","remote-svgs","react-components"],"license":"MIT","category":"ui-components","readme_excerpt":"react-inlinesvg Load inline, local, or remote SVGs in your React components. View the demo Highlights - 🏖 Easy to use: Just set the src - 🛠 Flexible: Personalize the options to fit your needs - ⚡️ Smart: Async requests will be cached. - 🚀 SSR: Safe for server-side rendering Usage And import it into your code: Props src {string} - required . The SVG to load. It accepts: - A URL or path to an SVG file (absolute or relative, including from a bundler import) - A data URI (base64 or URL-encoded) - A raw SVG string baseURL {string} A URL to prepend to url() references inside the SVG when using uniquifyIDs . Required if your page uses an HTML tag. children {ReactNode} The fallback content in case of a fetch error or unsupported browser. cacheRequests {boolean} ▶︎ true Cache remote SVGs in memory. When used with the CacheProvider, requests are also persisted in the browser cache. description {string} A description for your SVG. It will override an existing tag. fetchOptions {RequestInit} Custom options for the request. innerRef {React.Ref\\ } Set a ref on the SVG element. The SVG is processed and parsed so the ref won't be set on the initial render. You can use the onLoad callback to get and use the ref instead. loader {node} A component to be shown while the SVG is loading. onError {function} A callback to be invoked if loading the SVG fails. This will receive a single argument with: - a FetchError with: - or an Error for issues like missing src , unsupported browser, or invalid S","default_branch":null,"files":null,"tree":[],"storefront":"/r/gilbarbara","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/gilbarbara/react-inlinesvg/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}