How to use react-bootstrap-icons ?


How to use react-bootstrap-icons ?


install react-bootstrap-icons dependency

npm i react-bootstrap-icons

  1. Navigate to the website : 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