---
title: "Discussion on \"How to use SVGs as components in React\" | Hashnode"
description: "Discussion on \"How to use SVGs as components in React\". Styling SVGs in react to get hover and active state. Easily understand how to change the color of icons in React when styling"
url: "https://hashnode.com/posts/how-to-use-svgs-as-components-in-react/62642275d82f4558aff89a1a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to use SVGs as components in React](https://samueloso.hashnode.dev/how-to-use-svgs-as-components-in-react?utm_source=hashnode&utm_medium=feed)

Styling SVGs in react to get hover and active state. Easily understand how to change the color of icons in React when styling

Apr 23, 2022 · 3 min read · samueloso.hashnode.dev  
Read the article

-   [#css](https://hashnode.com/tag/css)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#svg](https://hashnode.com/tag/svg)

## Written by

[Samuel Oso](https://hashnode.com/@samueloso)

@samueloso · Lagos, Nigeria.

  
[View profile](https://hashnode.com/@samueloso)

Frontend Engineering

I am a front-end web developer. I’m passionate, and I enjoy working on projects that challenge me to learn something new and stretch in a different direction. I do my best to stay on top of changes in the state of the art so that I can meet challenges with tools well suited to the job at hand.

## Responses 2

Markdown supported · ⌘↵ to post

[Adeboye Adepeju](https://hashnode.com/@Adepeju01)

[Apr 23, 2022](https://hashnode.com/posts/how-to-use-svgs-as-components-in-react/62642275d82f4558aff89a1a/comment/626451070f819f588af7681b)

Thank you for this😌..I learnt something new👍

[Samuel Oso](https://hashnode.com/@samueloso)

[Apr 23, 2022](https://hashnode.com/posts/how-to-use-svgs-as-components-in-react/62642275d82f4558aff89a1a/comment/626451070f819f588af7681b#reply-62646792d82f4558aff89ff7)

Awesome! That's amazing

[Umoru abubakar](https://hashnode.com/@Ehmer)

[Apr 23, 2022](https://hashnode.com/posts/how-to-use-svgs-as-components-in-react/62642275d82f4558aff89a1a/comment/62642bf00f819f588af7651b)

This is awesome. I’ve learnt something new 💪🏽💪🏽

[Samuel Oso](https://hashnode.com/@samueloso)

[Apr 23, 2022](https://hashnode.com/posts/how-to-use-svgs-as-components-in-react/62642275d82f4558aff89a1a/comment/62642bf00f819f588af7651b#reply-62644d5e0f819f588af767e7)

That’s amazing!
