Skip to content

Next js app/api that provides an endpoint that renders SVG icons taking from react-icons package

Notifications You must be signed in to change notification settings

rolangom/react-icons-http-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Icons HTTP Provider API

Get SVG image from URL.

Example:

<img
  src="https://react-icons-http-provider.vercel.app/api/lu/LuHeartHandshake?color=salmon&size=100"
/>

Result:

loading

Thanks to "react-icons" package.

How to use it

/api/{iconLibrary}/{iconName}?color={color}&size={size}

  • Replace {iconLibrary} by any of the supported library of react-icons.
  • Replace {iconName} by the name of the desired icon.
  • Replace {color} by the desired color [OPTIONAL].
  • Replace {size} by the desired size [OPTIONAL].

by @rolangom

About

Next js app/api that provides an endpoint that renders SVG icons taking from react-icons package

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published