<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Tommy Ju</title>
    <description>The latest articles on DEV Community by Tommy Ju (@tommy_ju).</description>
    <link>https://dev.to/tommy_ju</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3781864%2Fb6838a87-3139-472c-b648-3064e6b7a4fa.jpeg</url>
      <title>DEV Community: Tommy Ju</title>
      <link>https://dev.to/tommy_ju</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/tommy_ju"/>
    <language>en</language>
    <item>
      <title>Building a Daily Coding Habit</title>
      <dc:creator>Tommy Ju</dc:creator>
      <pubDate>Fri, 27 Feb 2026 01:49:11 +0000</pubDate>
      <link>https://dev.to/tommy_ju/building-a-daily-coding-habit-20ma</link>
      <guid>https://dev.to/tommy_ju/building-a-daily-coding-habit-20ma</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Some weeks, coding feels effortless. I sit down at my computer, open my IDE, and naturally slip into focused work on a project that excites me.&lt;/p&gt;

&lt;p&gt;Other weeks, even opening my editor feels heavy. It takes real willpower to concentrate, and I’m overwhelmed by how much there is to learn.&lt;/p&gt;

&lt;p&gt;This article is about what I’ve learned from both building momentum and losing it — and how to create a sustainable daily coding habit.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Long-Term Power of Consistency
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;"Habits are the compound-interest of self improvement." — &lt;em&gt;James Clear&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On any single day, coding might not feel transformative. But over months and years, small repeated actions compound.&lt;/p&gt;

&lt;p&gt;Becoming a strong software developer isn’t about intense bursts of effort followed by burnout. It’s about steady, repeatable practice. Consistency beats intensity in the long run.&lt;/p&gt;

&lt;p&gt;When coding becomes a habit rather than a heroic effort, progress stops depending on motivation.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Make Coding a Daily Habit
&lt;/h2&gt;

&lt;p&gt;Building a daily coding habit is simple in principle: &lt;strong&gt;show up every day, no matter how small the effort.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;“Showing up” doesn’t always mean writing hundreds of lines of code. It can look like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Coding for five hours&lt;/li&gt;
&lt;li&gt;Coding for five minutes&lt;/li&gt;
&lt;li&gt;Reading documentation&lt;/li&gt;
&lt;li&gt;Reviewing a codebase&lt;/li&gt;
&lt;li&gt;Writing about something you learned&lt;/li&gt;
&lt;li&gt;Breaking a feature into smaller tasks&lt;/li&gt;
&lt;li&gt;Reflecting on a recent project&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Start with tasks that match your energy level. On low-energy days, reduce the scope until it feels almost too easy. &lt;strong&gt;If you feel friction, break the task down into even smaller pieces.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why "Just Showing Up" Works
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl3tue1g5zdih2p6jjtit.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl3tue1g5zdih2p6jjtit.jpg" alt="The three layers of behavior change" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many of us focus too much on outcomes: finishing the project, shipping the feature, mastering the framework.&lt;/p&gt;

&lt;p&gt;But meaningful change starts deeper — at the identity level.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;We act in alignment with who we believe we are.&lt;/strong&gt; When you show up consistently, even in small ways, you gather evidence that says:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"I am someone who codes."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Identity and behavior reinforce each other.&lt;br&gt;
Your identity influences your actions.&lt;br&gt;
Your actions reinforce your identity.&lt;/p&gt;

&lt;p&gt;By coding regularly you strengthen your identity as a developer. And once that identity solidifies, showing up becomes a natural extension of who you are.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Trap of Perfectionism
&lt;/h2&gt;

&lt;p&gt;Perfectionism used to stop me from starting at all.&lt;/p&gt;

&lt;p&gt;If I couldn’t do something perfectly, I didn’t want to do it. I would delay projects because I had high expectations and didn’t want the result to fall short.&lt;/p&gt;

&lt;p&gt;But software is inherently iterative. Skills are iterative. Growth is iterative.&lt;/p&gt;

&lt;p&gt;Progress requires drafts. Rough drafts. Messy drafts. Broken drafts.&lt;/p&gt;

&lt;p&gt;The habit of starting imperfectly is far more powerful than the habit of waiting for perfect conditions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;The hardest part of building a daily coding habit isn’t learning new technologies. It’s learning to show up consistently&lt;/p&gt;

&lt;p&gt;Lower the bar. Reduce friction. Accept imperfection.&lt;/p&gt;

&lt;p&gt;Focus less on intensity and more on identity.&lt;/p&gt;

&lt;p&gt;Because when you show up often enough, coding stops being something you try to do and starts becoming part of who you are.&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>discuss</category>
      <category>learning</category>
    </item>
    <item>
      <title>Making SVGs Customizable with CSS in Next.js (2026)</title>
      <dc:creator>Tommy Ju</dc:creator>
      <pubDate>Sat, 21 Feb 2026 00:53:27 +0000</pubDate>
      <link>https://dev.to/tommy_ju/making-svgs-customizable-with-css-in-nextjs-2026-p3l</link>
      <guid>https://dev.to/tommy_ju/making-svgs-customizable-with-css-in-nextjs-2026-p3l</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Are you confused by SVG icons that refuse to be styled with CSS?&lt;/p&gt;

&lt;p&gt;This article will give you a scalable workflow for styling SVG icons in your Next.js project.&lt;/p&gt;

&lt;p&gt;We will address the problems of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;CSS properties not applying to static SVG images&lt;/li&gt;
&lt;li&gt;Hard-coded attributes within SVG files that overwrite CSS properties&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;(The steps in this guide are specifically for &lt;strong&gt;Next.js v16+ and Typescript&lt;/strong&gt;, but the concepts also apply to general React projects)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why CSS Doesn't Work on Static SVGs
&lt;/h2&gt;

&lt;p&gt;When you try to use an SVG like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"your_icon.svg"&lt;/span&gt; &lt;span class="na"&gt;className&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="err"&gt;#&lt;/span&gt; &lt;span class="nx"&gt;or&lt;/span&gt;

&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Image&lt;/span&gt;
    &lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;your_icon.svg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;alt&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GitHub&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
    &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;48&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;icon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The SVG is treated as a static external image file, similar to a PNG or JPG. You can resize it, but you cannot style or animate the contents with CSS. The root cause is not the &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; or &lt;code&gt;&amp;lt;Image&amp;gt;&lt;/code&gt; tag itself, but the fact that the SVG is being loaded from the &lt;code&gt;public/&lt;/code&gt; directory which is specifically meant for static assets.&lt;/p&gt;

&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;

&lt;p&gt;To make our SVGs customizable with CSS, we will convert them to React components using &lt;a href="https://react-svgr.com/docs/what-is-svgr/" rel="noopener noreferrer"&gt;SVGR&lt;/a&gt; and move them out of the the &lt;code&gt;/public&lt;/code&gt; directory:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install SVGR as a dev dependency&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--save-dev&lt;/span&gt; @svgr/webpack
&lt;span class="c"&gt;# or use yarn&lt;/span&gt;
yarn add &lt;span class="nt"&gt;--dev&lt;/span&gt; @svgr/webpack
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure SVGR in &lt;code&gt;next.config.ts&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;NextConfig&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;next&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;nextConfig&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;NextConfig&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="cm"&gt;/* config options here */&lt;/span&gt;

  &lt;span class="na"&gt;turbopack&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;rules&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*.svg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;loaders&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@svgr/webpack&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="na"&gt;as&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;*.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;nextConfig&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;&lt;em&gt;We are using the &lt;a href="https://nextjs.org/docs/app/api-reference/turbopack" rel="noopener noreferrer"&gt;TurboPack&lt;/a&gt; asset bundler which is the fully supported default in Next.js v16.&lt;/em&gt;  &lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the SVG in your code as follows, &lt;strong&gt;you must ensure that the SVG is not stored in &lt;code&gt;/public&lt;/code&gt;.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;GithubIcon&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@/icons/github.svg&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ExternalLinks&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;GithubIcon&lt;/span&gt;
            &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nx"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="mi"&gt;24&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;icon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
        &lt;span class="o"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Congratulations! Your SVG is now a React component rendered in the DOM as JSX, rather than a static file in &lt;code&gt;/public&lt;/code&gt;. This makes it fully styleable, interactive, and dynamic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleaning Hard-Coded SVG Attributes that Overwrite CSS
&lt;/h2&gt;

&lt;p&gt;Some SVGs may contain hard-coded attributes that overwrite your CSS styles. In the following image, the LinkedIn icon refuses to be any color other than black.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdi2nhj9kfnwjcb3bk9x2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdi2nhj9kfnwjcb3bk9x2.png" alt="SVG image with hard-coded attributes" width="418" height="119"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you open the SVG file in your text editor, you can confirm this by looking for hard-coded attributes such as &lt;code&gt;fill&lt;/code&gt;, &lt;code&gt;stroke&lt;/code&gt;, and &lt;code&gt;style&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"800px"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"800px"&lt;/span&gt; &lt;span class="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="na"&gt;xmlns=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Hard-coded fill attribute prevents color changes with CSS --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"..."&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"#0F0F0F"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Solution
&lt;/h3&gt;

&lt;p&gt;For smaller projects you can manually replace or remove hard-coded attributes that affect the appearance of the SVG.&lt;/p&gt;

&lt;p&gt;However, this may be time consuming if you have many SVG files. Here's how you can automate this process using &lt;a href="https://svgo.dev/" rel="noopener noreferrer"&gt;SVGO&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We will modify the SVG to inherit its color from CSS via the &lt;code&gt;color&lt;/code&gt; property, making it compatible with both plain CSS and utility frameworks like Tailwind.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install SVGO as a dev dependency&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt; npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-D&lt;/span&gt; svgo
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create a file in the root directory called &lt;code&gt;svgo.config.js&lt;/code&gt; with the following code&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;module&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exports&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;plugins&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;preset-default&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;overrides&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="na"&gt;removeViewBox&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// keep viewBox for proper scaling&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;

    &lt;span class="c1"&gt;// Remove hard-coded fill, stroke, and style attributes&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;removeAttrs&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;attrs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;(fill|stroke|style)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;

    &lt;span class="c1"&gt;// Add fill="currentColor" to the root &amp;lt;svg&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;addAttributesToSVGElement&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;params&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;attributes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
          &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;currentColor&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="p"&gt;],&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add a script in &lt;code&gt;package.json&lt;/code&gt; for cleaning the SVG files, &lt;em&gt;ensure that the path points to the location where your SVG files are stored&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="nl"&gt;"scripts"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"clean-icons"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"svgo --config=svgo.config.js [PATH_TO_SVG_DIRECTORY]/*.svg"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="err"&gt;,&lt;/span&gt;&lt;span class="w"&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the script to automatically modify the hard-coded attributes from your SVG files that overwrite your CSS&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm run clean-icons
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By converting your SVGs to React components with SVGR and cleaning hard-coded attributes with SVGO, you can create fully dynamic, styleable, and maintainable icons in Next.js. This workflow ensures your SVGs respond to CSS, support animations, and remain scalable.&lt;/p&gt;

&lt;p&gt;Feel free to adapt this workflow to your own projects and share any tips or improvements you discover along the way!&lt;/p&gt;

</description>
      <category>nextjs</category>
      <category>webdev</category>
      <category>react</category>
      <category>svg</category>
    </item>
  </channel>
</rss>
