react-icons / react-icons

svg react icons of popular icon packs
https://react-icons.github.io/react-icons/
Other
11.22k stars 724 forks source link

[Feature]: Border #915

Open Faheem-Siddiqi opened 3 months ago

Faheem-Siddiqi commented 3 months ago

Describe

I want to add border to icon but its giving me square border.

image

Solution

Border to icon, not a square border

Minimal sample repository URL

No response

Additional context

I am using tailwindscss

nazmulweb commented 2 months ago

You can add a border using CSS. Let's say your icon is something like that, and you would like to add a border here. Then use the stroke and stroke-width of CSS in the path tag.

`<svg ....>

`

path { stroke: red; stroke-width: 1px; }

Faheem-Siddiqi commented 2 months ago

You can add a border using CSS. Let's say your icon is something like that, and you would like to add a border here. Then use the stroke and stroke-width of CSS in the path tag.

<svg ....> <path d="....."></path> </svg>

path { stroke: red; stroke-width: 1px; }

I am asking specifically for React Icons consider import { CiHeart } from "react-icons/ci";