Skip to main content

Command Palette

Search for a command to run...

How to use react-bootstrap-icons ?

Published
1 min read
S

I love learning about technology and sharing that with others


How to use react-bootstrap-icons ?


install react-bootstrap-icons dependency

npm i react-bootstrap-icons

  1. Navigate to the website : https://icons.getbootstrap.com/#usage to see all the icons that we can use
  2. Let say we wants to use the icon called as trash

so lets see how we can use this in our component here we have imported the icon that we need like "trash" and then we added it as a componentt we can give any color , size and we can send it as a prop in the component.


import React from 'react'
import { Trash } from 'react-bootstrap-icons'
import { PencilSquare } from 'react-bootstrap-icons'
function milestone() {
return (
<div>
<PencilSquare size={35} />
<Trash size={35} />
</div>
)
}
export default milestone
35 views

More from this blog

H

hashcodehub

271 posts

Consistent, Passionate and Organized :)