<?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: Svg/icons</title>
    <description>The latest articles on DEV Community by Svg/icons (@svgicons).</description>
    <link>https://dev.to/svgicons</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3940768%2F093b279b-947a-4e08-b433-4da6f4e803c7.png</url>
      <title>DEV Community: Svg/icons</title>
      <link>https://dev.to/svgicons</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/svgicons"/>
    <language>en</language>
    <item>
      <title>Before You Pick an Icon Set, Test These 12 Dashboard Actions --&gt;</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Tue, 17 Nov 2026 18:33:55 +0000</pubDate>
      <link>https://dev.to/svgicons/before-you-pick-an-icon-set-test-these-12-dashboard-actions--9jf</link>
      <guid>https://dev.to/svgicons/before-you-pick-an-icon-set-test-these-12-dashboard-actions--9jf</guid>
      <description>&lt;p&gt;The first few icons are easy. Search, add, settings. Then your dashboard needs a billing destination, a share action and a way to export a report. Those choices deserve a review before they become imports scattered across your components.&lt;/p&gt;

&lt;p&gt;Here is a practical exercise you can use when evaluating a candidate icon family. Take twelve actions from one screen, record a candidate for each, and review them together in the layout where they will appear.&lt;/p&gt;

&lt;p&gt;The worked example uses &lt;strong&gt;Heroicons v2.2.0, 24-pixel outline variants&lt;/strong&gt;, with twelve named source files. It is an illustrative selection exercise. There are no user-study results or rankings attached to it.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fipyl6t6d1uqkfdsbidca.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fipyl6t6d1uqkfdsbidca.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The twelve candidates used in this exercise. Icons by Tailwind Labs, from Heroicons v2.2.0, under the MIT license.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Write down what each action actually does
&lt;/h2&gt;

&lt;p&gt;Give each row a concrete outcome before opening the icon picker. “Billing” could open invoices, payment methods or a subscription page. “Share” could copy a URL or invite someone to collaborate.&lt;/p&gt;

&lt;p&gt;For this example, the outcomes and candidates are as follows.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;Outcome in this example&lt;/th&gt;
&lt;th&gt;Heroicons filename&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Search&lt;/td&gt;
&lt;td&gt;Find a report by its title&lt;/td&gt;
&lt;td&gt;&lt;code&gt;magnifying-glass.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Filter&lt;/td&gt;
&lt;td&gt;Limit the visible reports&lt;/td&gt;
&lt;td&gt;&lt;code&gt;funnel.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sort&lt;/td&gt;
&lt;td&gt;Change the order of the report list&lt;/td&gt;
&lt;td&gt;&lt;code&gt;arrows-up-down.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Add&lt;/td&gt;
&lt;td&gt;Create a new report&lt;/td&gt;
&lt;td&gt;&lt;code&gt;plus.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Edit&lt;/td&gt;
&lt;td&gt;Modify one report&lt;/td&gt;
&lt;td&gt;&lt;code&gt;pencil-square.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delete&lt;/td&gt;
&lt;td&gt;Remove one report after confirmation&lt;/td&gt;
&lt;td&gt;&lt;code&gt;trash.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Download&lt;/td&gt;
&lt;td&gt;Save an exported report locally&lt;/td&gt;
&lt;td&gt;&lt;code&gt;arrow-down-tray.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Share&lt;/td&gt;
&lt;td&gt;Open the report-sharing dialog&lt;/td&gt;
&lt;td&gt;&lt;code&gt;share.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Notifications&lt;/td&gt;
&lt;td&gt;Open recent account notifications&lt;/td&gt;
&lt;td&gt;&lt;code&gt;bell.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Settings&lt;/td&gt;
&lt;td&gt;Open workspace settings&lt;/td&gt;
&lt;td&gt;&lt;code&gt;cog-6-tooth.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Billing&lt;/td&gt;
&lt;td&gt;Open payment and subscription settings&lt;/td&gt;
&lt;td&gt;&lt;code&gt;credit-card.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Sign out&lt;/td&gt;
&lt;td&gt;End the current account session&lt;/td&gt;
&lt;td&gt;&lt;code&gt;arrow-right-on-rectangle.svg&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These mappings are candidates for this particular interface. If your billing page is primarily an invoice archive, review a document or receipt candidate as well. If Share only copies a link, compare that choice with a link symbol and the label “Copy link.”&lt;/p&gt;

&lt;p&gt;The useful deliverable is a table that another developer can understand without repeating your searches.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Check coverage before polishing individual icons
&lt;/h2&gt;

&lt;p&gt;Try to fill every row from the same family and variant. Record any unresolved row immediately.&lt;/p&gt;

&lt;p&gt;All twelve candidates above are present in the chosen Heroicons release. That establishes file availability for this exercise. Whether each candidate communicates the intended action still needs review in your product.&lt;/p&gt;

&lt;p&gt;Give every row one of three review statuses.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Ready for implementation&lt;/strong&gt; — a candidate is selected, with a label and a destination or action defined.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Needs comparison&lt;/strong&gt; — two candidates remain plausible, or the intended meaning needs clarification.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Needs another solution&lt;/strong&gt; — the family lacks a suitable candidate for the product requirement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Avoid quietly filling a difficult row with an unrelated family's icon. Record the exception so the team can decide whether to use a text label, commission an additional asset, or reconsider the family.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Put the candidates into a small screen fixture
&lt;/h2&gt;

&lt;p&gt;A grid makes omissions easy to spot. A screen fixture reveals the spacing and density of the actual controls.&lt;/p&gt;

&lt;p&gt;In the example below, the same report layout uses 16-pixel icons on the left and 24-pixel icons on the right. Search, Filter and Sort keep visible labels. The repeated row actions use Edit, Download and Share in the same order.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg5c8asdsvb9fiyxddekv.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg5c8asdsvb9fiyxddekv.png" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Illustrative screen fixture rendered from the original SVG paths. Display sizes are defined in the source artwork. Resize or zoom the article image only for inspection, then check the icons at actual CSS sizes in your application.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Look at the busiest row first. Can you distinguish the pencil, download tray and share symbol at the size your layout allows? Do their surrounding spaces remain comfortable when a report title is long?&lt;/p&gt;

&lt;p&gt;Review the control's clickable area separately from the visible icon. A 16-pixel drawing can sit inside a larger button. The illustration shows candidate placement, while your implementation must provide the actual controls, labels and interactions.&lt;/p&gt;

&lt;p&gt;Repeat the check on the backgrounds your application uses. Keep any conclusions specific. “We prefer the 24-pixel version in this report row” is an actionable design decision. A universal verdict about the icon family would require much broader evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Resolve the rows that need more than a symbol
&lt;/h2&gt;

&lt;p&gt;Two rows deserve particular attention in this sample.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Sort&lt;/strong&gt; needs to communicate more than its availability. Once a user chooses an order, the interface should expose the current field and direction, for example “Date, newest first.” Record that requirement beside the icon choice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Delete&lt;/strong&gt; needs a clear scope. “Delete report” and “Delete selected reports” should not become indistinguishable actions just because they share a trash symbol. Keep the scope in the label and any confirmation text.&lt;/p&gt;

&lt;p&gt;This review produces implementation requirements as well as SVG selections. Keep them together so they survive the handoff.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Keep the source and license beside the selection
&lt;/h2&gt;

&lt;p&gt;For each chosen asset, record the family, variant, version, original filename and source URL. For this example, all files come from the &lt;code&gt;optimized/24/outline&lt;/code&gt; directory of the Heroicons v2.2.0 release.&lt;/p&gt;

&lt;p&gt;Retain the upstream license notice with your asset package. The Heroicons release includes an MIT license from Tailwind Labs. Consult the actual license text for its terms, and check the relevant source separately when adding assets from another family.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/tailwindlabs/heroicons/tree/v2.2.0/optimized/24/outline" rel="noopener noreferrer"&gt;Heroicons v2.2.0 source directory&lt;/a&gt; · &lt;a href="https://github.com/tailwindlabs/heroicons/blob/v2.2.0/LICENSE" rel="noopener noreferrer"&gt;Heroicons license&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Leave a record that survives the next redesign
&lt;/h2&gt;

&lt;p&gt;A small selection record can contain both the asset identity and the decision around it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"action"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"download-report"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Download report"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"family"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Heroicons"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2.2.0"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"variant"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"24/outline"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"file"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"arrow-down-tray.svg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://github.com/tailwindlabs/heroicons/blob/v2.2.0/optimized/24/outline/arrow-down-tray.svg"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"license"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MIT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"reviewStatus"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"needs-in-context-review"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is an example record, with an explicit pending status. After reviewing the actual interface, update it with the chosen display size and any context-specific notes.&lt;/p&gt;

&lt;p&gt;Your final checklist can be short.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Each required action has a candidate or a documented exception.&lt;/li&gt;
&lt;li&gt;[ ] The outcome and label are recorded for each action.&lt;/li&gt;
&lt;li&gt;[ ] The busiest screen has been reviewed at its real display sizes.&lt;/li&gt;
&lt;li&gt;[ ] Sort direction, destructive scope and other state requirements are recorded.&lt;/li&gt;
&lt;li&gt;[ ] Source filenames, versions and license notices accompany the assets.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can start your candidate search on SVGicons, then use this twelve-action sheet to keep track of the decisions. Change the actions to match your product before evaluating a family.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://svgicons.com/svg-icons-for-saas-dashboards" rel="noopener noreferrer"&gt;Explore SVGicons for SaaS dashboards&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more on assigning meaning to dashboard symbols, our earlier article covers that part of the process.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/svgicons/stop-picking-dashboard-icons-by-keyword-ij2"&gt;Stop Picking Dashboard Icons by Keyword&lt;/a&gt;&lt;/p&gt;

</description>
      <category>svg</category>
      <category>webdev</category>
      <category>design</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Why Your Sidebar Icons Look Inconsistent - Even at the Same Size</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Mon, 16 Nov 2026 14:44:15 +0000</pubDate>
      <link>https://dev.to/svgicons/why-your-sidebar-icons-look-inconsistent-even-at-the-same-size-3df2</link>
      <guid>https://dev.to/svgicons/why-your-sidebar-icons-look-inconsistent-even-at-the-same-size-3df2</guid>
      <description>&lt;p&gt;You set every sidebar icon to &lt;code&gt;24 × 24&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The labels line up. The spacing is consistent. The colors match.&lt;/p&gt;

&lt;p&gt;Yet the navigation still feels uneven.&lt;/p&gt;

&lt;p&gt;One icon looks heavier than its neighbors. Another seems too small. A third has sharp corners beside rounded shapes.&lt;/p&gt;

&lt;p&gt;Before adding more CSS overrides, check the artwork itself.&lt;/p&gt;

&lt;p&gt;Identical dimensions give icons the same box. They do not guarantee the same visual size, weight, or drawing style.&lt;/p&gt;

&lt;p&gt;Here is a practical way to find the mismatch and build a more coherent sidebar.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Check the drawing inside the box
&lt;/h2&gt;

&lt;p&gt;This rule gives every SVG the same dimensions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.sidebar-icon&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;24px&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;/div&gt;



&lt;p&gt;But the visible artwork may occupy very different amounts of that space.&lt;/p&gt;

&lt;p&gt;Compare these two SVGs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;circle&lt;/span&gt; &lt;span class="na"&gt;cx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"12"&lt;/span&gt; &lt;span class="na"&gt;cy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"12"&lt;/span&gt; &lt;span class="na"&gt;r&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"10"&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;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;circle&lt;/span&gt; &lt;span class="na"&gt;cx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"12"&lt;/span&gt; &lt;span class="na"&gt;cy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"12"&lt;/span&gt; &lt;span class="na"&gt;r&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"7"&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;p&gt;Both have a &lt;code&gt;24 × 24&lt;/code&gt; coordinate system. Both can render inside a &lt;code&gt;24 × 24&lt;/code&gt; CSS box.&lt;/p&gt;

&lt;p&gt;The second circle still looks smaller.&lt;/p&gt;

&lt;p&gt;Real icons introduce more variation:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Empty space around the artwork.&lt;/li&gt;
&lt;li&gt;Tall, wide, or circular silhouettes.&lt;/li&gt;
&lt;li&gt;Dense details or large open areas.&lt;/li&gt;
&lt;li&gt;Shapes that extend close to the edges.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When an icon looks undersized, inspect its internal spacing before increasing its CSS dimensions.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Compare visual weight, not just stroke width
&lt;/h2&gt;

&lt;p&gt;Two icons can use the same stroke width and still feel unbalanced.&lt;/p&gt;

&lt;p&gt;A detailed gear contains more edges than a simple chevron. A solid shape may appear heavier than an outline. A wide symbol distributes its weight differently from a narrow one.&lt;/p&gt;

&lt;p&gt;Review these properties together:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Property&lt;/th&gt;
&lt;th&gt;What to inspect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Fill style&lt;/td&gt;
&lt;td&gt;Outline, solid, or mixed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Stroke&lt;/td&gt;
&lt;td&gt;Thickness, line endings, and joins&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Corners&lt;/td&gt;
&lt;td&gt;Rounded or angular construction&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Detail&lt;/td&gt;
&lt;td&gt;Simple shapes or intricate drawings&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Internal spacing&lt;/td&gt;
&lt;td&gt;How much of the box the artwork occupies&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A single mismatch is easy to miss in a large preview. It becomes more obvious when the icons sit beside one another in navigation.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Choose icons as a group
&lt;/h2&gt;

&lt;p&gt;Searching for each icon independently can produce a sidebar assembled from unrelated styles.&lt;/p&gt;

&lt;p&gt;The home icon looks good.&lt;br&gt;&lt;br&gt;
The folder icon looks good.&lt;br&gt;&lt;br&gt;
The team icon looks good.&lt;/p&gt;

&lt;p&gt;Together, they may not belong.&lt;/p&gt;

&lt;p&gt;Start with the navigation concepts your interface needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Overview
Projects
Team
Settings
Search
Notifications
Help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then compare candidate families against the whole list.&lt;/p&gt;

&lt;p&gt;Check whether each family has suitable symbols for your actual actions. Choosing a family because you like one icon can create problems when you need the remaining six.&lt;/p&gt;

&lt;p&gt;On &lt;a href="https://svgicons.com/" rel="noopener noreferrer"&gt;SVGicons.com&lt;/a&gt;, you can search for the required concepts and browse individual sets to evaluate their coverage and visual style.&lt;/p&gt;

&lt;p&gt;The useful question is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can this family support the navigation as a whole?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Give icons a stable place in the layout
&lt;/h2&gt;

&lt;p&gt;Once the artwork is coherent, make the component predictable.&lt;/p&gt;

&lt;p&gt;Here is a small example using a simple project symbol:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;nav&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sidebar"&lt;/span&gt; &lt;span class="na"&gt;aria-label&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Main navigation"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt;
    &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sidebar-link"&lt;/span&gt;
    &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"/projects"&lt;/span&gt;
    &lt;span class="na"&gt;aria-current&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"page"&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt;
      &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"sidebar-icon"&lt;/span&gt;
      &lt;span class="na"&gt;xmlns&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://www.w3.org/2000/svg"&lt;/span&gt;
      &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;
      &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
      &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;
      &lt;span class="na"&gt;stroke-width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;
      &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
      &lt;span class="na"&gt;focusable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;rect&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"4"&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"4"&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt; &lt;span class="na"&gt;rx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;rect&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"14"&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"4"&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt; &lt;span class="na"&gt;rx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;rect&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"4"&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"14"&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt; &lt;span class="na"&gt;rx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt; &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;rect&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"14"&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"14"&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt; &lt;span class="na"&gt;rx&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"1"&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;span class="nt"&gt;&amp;lt;span&amp;gt;&lt;/span&gt;Projects&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.sidebar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;box-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;border-box&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;16rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;max-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="kt"&gt;%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#151f32&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sidebar-link&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;2.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.625rem&lt;/span&gt; &lt;span class="mf"&gt;0.875rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#c3cee1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sidebar-icon&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mf"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sidebar-link&lt;/span&gt; &lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;anywhere&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sidebar-link&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nt"&gt;aria-current&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"page"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#b5c9ff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#263b68&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sidebar-link&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nt"&gt;focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2px&lt;/span&gt; &lt;span class="n"&gt;solid&lt;/span&gt; &lt;span class="mh"&gt;#b5c9ff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;outline-offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3px&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;/div&gt;



&lt;p&gt;Several details help:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;flex: 0 0 1.5rem&lt;/code&gt; prevents the icon from shrinking beside a long label.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;align-items: center&lt;/code&gt; centers the icon box against the text.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;currentColor&lt;/code&gt; lets the drawing follow the link color.&lt;/li&gt;
&lt;li&gt;The visible label supplies the accessible name, so the SVG is decorative.&lt;/li&gt;
&lt;li&gt;The focus outline makes keyboard navigation visible.&lt;/li&gt;
&lt;li&gt;Long labels can wrap without squeezing the icon.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The drawing attributes in this example suit a monochrome outline icon. Preserve the intended rendering when working with filled or multicolor artwork.&lt;/p&gt;

&lt;p&gt;If labels wrap onto several lines, also check whether centered or top-aligned icons work better for your particular layout.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Review the source before adding another override
&lt;/h2&gt;

&lt;p&gt;An occasional optical adjustment can be useful.&lt;/p&gt;

&lt;p&gt;But a growing list of exceptions deserves investigation:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.icon-overview&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.91&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="nc"&gt;.icon-projects&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;translateY&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;-1px&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="nc"&gt;.icon-team&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;transform&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;scale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1.13&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="nc"&gt;.icon-settings&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;1.4&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;/div&gt;



&lt;p&gt;Before adding another rule, check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Did an icon come from a different family?&lt;/li&gt;
&lt;li&gt;Did you accidentally mix outline and filled variants?&lt;/li&gt;
&lt;li&gt;Does the artwork contain unusually large margins?&lt;/li&gt;
&lt;li&gt;Is the symbol too detailed for its display size?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Scaling an icon normally changes its stroke and detail as well as its apparent size. It can improve one mismatch while introducing another.&lt;/p&gt;

&lt;p&gt;Prefer a suitable source icon, then make small adjustments where the actual interface requires them.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Test inside the component
&lt;/h2&gt;

&lt;p&gt;A large preview helps you inspect the drawing. Your users will encounter it inside a button, link, or navigation row.&lt;/p&gt;

&lt;p&gt;Review the sidebar:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At its intended display size.&lt;/li&gt;
&lt;li&gt;In default, hover, active, and keyboard-focus states.&lt;/li&gt;
&lt;li&gt;Against each supported background.&lt;/li&gt;
&lt;li&gt;With longer labels.&lt;/li&gt;
&lt;li&gt;At narrow widths.&lt;/li&gt;
&lt;li&gt;In collapsed navigation, if available.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Collapsed navigation needs particular attention.&lt;/p&gt;

&lt;p&gt;Labels can make similar symbols easy to distinguish. Once the labels disappear, the same icons may become ambiguous.&lt;/p&gt;

&lt;p&gt;Provide accessible names for icon-only controls and a way for sighted users to discover their meaning. For example, a tooltip should work on keyboard focus as well as hover.&lt;/p&gt;

&lt;p&gt;A coherent appearance does not guarantee a clear meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Record the selection rules
&lt;/h2&gt;

&lt;p&gt;Make future additions easier by keeping a short note with the project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Navigation icon rules

Family: [selected family]
Variant: Outline
Display size: 24px
Color: currentColor
Source: [source page]
License: [license and required notices]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The next developer should be able to find a compatible icon without guessing how the original selection was made.&lt;/p&gt;

&lt;p&gt;Keep the relevant license information too. Finding icons through one website does not mean every set uses the same license.&lt;/p&gt;

&lt;h2&gt;
  
  
  Before shipping
&lt;/h2&gt;

&lt;p&gt;Review the navigation as a group:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does the selected family cover the required actions?&lt;/li&gt;
&lt;li&gt;Are fill style, stroke, and corner treatment coherent?&lt;/li&gt;
&lt;li&gt;Do the visible shapes feel balanced?&lt;/li&gt;
&lt;li&gt;Do icons retain their dimensions beside long labels?&lt;/li&gt;
&lt;li&gt;Are active and keyboard-focus states clear?&lt;/li&gt;
&lt;li&gt;Are symbols understandable when labels disappear?&lt;/li&gt;
&lt;li&gt;Can another developer identify the source and license?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Matching dimensions is a useful starting point. The final result depends on the drawings you choose and the components that display them.&lt;/p&gt;

&lt;p&gt;For your next sidebar, list the actions first, compare the icons together, and test them at their actual size before committing.&lt;/p&gt;

&lt;p&gt;You can use &lt;a href="https://svgicons.com/" rel="noopener noreferrer"&gt;SVGicons.com&lt;/a&gt; to search across icon sets and compare candidates before integrating them.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Disclosure: I run SVGicons.com. This article shares a practical selection and integration workflow. The four-square SVG in the code example was created specifically for this explanation.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>svg</category>
      <category>css</category>
      <category>design</category>
    </item>
    <item>
      <title>Your Chevron Looks Fine. Your Button Has No Name.</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Thu, 05 Nov 2026 11:22:15 +0000</pubDate>
      <link>https://dev.to/svgicons/your-chevron-looks-fine-your-button-has-no-name-1o96</link>
      <guid>https://dev.to/svgicons/your-chevron-looks-fine-your-button-has-no-name-1o96</guid>
      <description>&lt;p&gt;A chevron can be perfectly aligned, beautifully drawn, and completely unhelpful when its button receives keyboard focus.&lt;/p&gt;

&lt;p&gt;You see a control that opens something. Assistive technology needs a name that explains what that control does.&lt;/p&gt;

&lt;p&gt;That gap is easy to miss in a screenshot review. It is also easy to repeat across an entire application when the button lives inside a reusable component.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before polishing another icon, inspect the name of the button around it.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  A real report, a familiar integration mistake
&lt;/h2&gt;

&lt;p&gt;On November 4, 2026, a &lt;a href="https://github.com/shadcn-ui/ui/issues/12592" rel="noopener noreferrer"&gt;shadcn/ui issue&lt;/a&gt; reported an unnamed chevron trigger in the Base UI version of &lt;code&gt;ComboboxInput&lt;/code&gt;. The reporter described an axe &lt;code&gt;button-name&lt;/code&gt; violation and a generic button announcement.&lt;/p&gt;

&lt;p&gt;A &lt;a href="https://github.com/shadcn-ui/ui/pull/12595" rel="noopener noreferrer"&gt;proposed fix&lt;/a&gt; adds visually hidden text to trigger and clear controls. Both the issue and proposal were open when checked on November 5, 2026.&lt;/p&gt;

&lt;p&gt;This is a useful starting point for a smaller question: &lt;strong&gt;what should your own icon-button component require from its caller?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The examples below are original, simplified React examples. They demonstrate button naming, not a replacement implementation of shadcn/ui's combobox. No independent screen-reader recordings or axe results are claimed here.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three buttons. The same pixels. Different names.
&lt;/h2&gt;

&lt;p&gt;Start with a deliberately simple chevron:&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ChevronDown&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;
      &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt;
      &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt;
      &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;
      &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
      &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;
      &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;
      &lt;span class="na"&gt;strokeLinecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
      &lt;span class="na"&gt;strokeLinejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
      &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
      &lt;span class="na"&gt;focusable&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt; &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"m6 9 6 6 6-6"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;The SVG is decorative here: the surrounding button will carry the action's name.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The version that leaves the action unnamed
&lt;/h3&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;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ChevronDown&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There is no text, &lt;code&gt;aria-label&lt;/code&gt;, or naming reference. With the SVG hidden from assistive technology, this button has no accessible name.&lt;/p&gt;

&lt;p&gt;Its shape cannot tell the accessibility tree whether the action is “Show filters,” “Expand invoice,” or “Choose country.”&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Give the button an explicit label
&lt;/h3&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;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;aria-label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Show filters"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ChevronDown&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this example, the expected accessible name is &lt;code&gt;Show filters&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Notice where the label goes: on the interactive element. Name the action, rather than describing the asset as “down chevron.”&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Keep the label in the button's content
&lt;/h3&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;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ChevronDown&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&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;"sr-only"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Show filters&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With suitable CSS, the text remains available to assistive technology while being visually hidden:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.sr-only&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;clip-path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;white-space&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;nowrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&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;/div&gt;



&lt;p&gt;The class name itself does nothing unless your stylesheet defines it. Do not replace this with &lt;code&gt;display: none&lt;/code&gt;, &lt;code&gt;visibility: hidden&lt;/code&gt;, or the &lt;code&gt;hidden&lt;/code&gt; attribute: those would hide this text from the accessibility tree too.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Version&lt;/th&gt;
&lt;th&gt;Expected accessible name&lt;/th&gt;
&lt;th&gt;Expected naming outcome&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SVG only, as shown&lt;/td&gt;
&lt;td&gt;Empty&lt;/td&gt;
&lt;td&gt;Fails &lt;code&gt;button-name&lt;/code&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Button with &lt;code&gt;aria-label&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Show filters&lt;/td&gt;
&lt;td&gt;Satisfies the naming rule&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Button with visually hidden text&lt;/td&gt;
&lt;td&gt;Show filters&lt;/td&gt;
&lt;td&gt;Satisfies the naming rule&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are expected outcomes for the snippets, not measured test results. Passing a naming rule does not prove that a complete component is accessible.&lt;/p&gt;

&lt;h2&gt;
  
  
  Put the requirement in your React API
&lt;/h2&gt;

&lt;p&gt;A code review comment fixes one instance. A required component prop makes the requirement visible at every call site.&lt;/p&gt;

&lt;p&gt;Here is a deliberately small TypeScript wrapper for decorative icons:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&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;ComponentPropsWithoutRef&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ReactNode&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;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;IconButtonProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Omit&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;
  &lt;span class="nx"&gt;ComponentPropsWithoutRef&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;children&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aria-label&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;aria-labelledby&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dangerouslySetInnerHTML&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ReactNode&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;IconButton&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&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="nx"&gt;buttonProps&lt;/span&gt;
&lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;IconButtonProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;IconButton requires a non-empty action label.&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="k"&gt;return &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;...&lt;/span&gt;&lt;span class="nx"&gt;buttonProps&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;aria-label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt; &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;icon&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;Usage makes the intended action explicit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;IconButton&lt;/span&gt;
  &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Clear search"&lt;/span&gt;
  &lt;span class="na"&gt;icon&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;ClearIcon&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
  &lt;span class="na"&gt;onClick&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;clearSearch&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;ClearIcon&lt;/code&gt; and &lt;code&gt;clearSearch&lt;/code&gt; represent your application's icon component and handler. Pass decorative icon markup, never another interactive control, into &lt;code&gt;icon&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The wrapper requires a label and rejects whitespace-only strings. It cannot judge whether “Clear search” accurately describes your handler. That still belongs in your review—and your translation workflow.&lt;/p&gt;

&lt;p&gt;For repeated row actions, add useful context: &lt;code&gt;Delete invoice INV-1042&lt;/code&gt; is more distinguishable than twenty buttons named &lt;code&gt;Delete&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  A name does not implement a combobox
&lt;/h2&gt;

&lt;p&gt;Our snippets intentionally isolate one defect.&lt;/p&gt;

&lt;p&gt;If your chevron opens a combobox popup, adding a label does not implement keyboard navigation, focus management, selection, or expanded-state reporting. Preserve the behavior and ARIA relationships supplied by the component library, following the &lt;a href="https://www.w3.org/WAI/ARIA/apg/patterns/combobox/" rel="noopener noreferrer"&gt;WAI-ARIA combobox pattern&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Do not copy a standalone button's tab behavior into a composite widget without checking that widget's keyboard model.&lt;/p&gt;

&lt;p&gt;Likewise, &lt;code&gt;aria-expanded&lt;/code&gt; communicates state; it does not supply the missing action name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Verify the rendered control
&lt;/h2&gt;

&lt;p&gt;After integrating a fix:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inspect the actual rendered button in your browser's accessibility tools. Check its role and computed name.&lt;/li&gt;
&lt;li&gt;Run axe and inspect the specific &lt;code&gt;button-name&lt;/code&gt; result. Keep other failures separate.&lt;/li&gt;
&lt;li&gt;Exercise the component with the keyboard, including opening, closing, and returning focus where appropriate.&lt;/li&gt;
&lt;li&gt;Check it with your supported browser and screen-reader combinations. Record the combination before quoting an announcement.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A useful regression assertion targets the action users need:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="c1"&gt;// React Testing Library, after rendering your component:&lt;/span&gt;
&lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;screen&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&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;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;Clear search&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="nf"&gt;toBeInTheDocument&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This assertion uses React Testing Library's &lt;code&gt;screen&lt;/code&gt; and the jest-dom matchers. It checks that a named button exists; it does not replace interaction tests or manual testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the icon. Name the action.
&lt;/h2&gt;

&lt;p&gt;When browsing &lt;a href="https://svgicons.com" rel="noopener noreferrer"&gt;SVGicons&lt;/a&gt;, you may choose the same chevron for several parts of your interface. Its visual consistency is useful. Its accessible label still needs to come from each action's context.&lt;/p&gt;

&lt;p&gt;A file called &lt;code&gt;chevron-down.svg&lt;/code&gt; cannot know whether your button reveals filters, shipping options, or account settings.&lt;/p&gt;

&lt;p&gt;Build that decision into the component that uses it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The next time you review an icon-only button, ask: if I could not see this icon, would its name tell me what happens when I activate it?&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/shadcn-ui/ui/issues/12592" rel="noopener noreferrer"&gt;shadcn/ui: reported ComboboxInput naming issue #12592&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/shadcn-ui/ui/pull/12595" rel="noopener noreferrer"&gt;shadcn/ui: proposed trigger and clear-button fix #12595&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/WAI/ARIA/apg/patterns/button/" rel="noopener noreferrer"&gt;W3C WAI-ARIA APG: Button pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.w3.org/WAI/ARIA/apg/patterns/combobox/" rel="noopener noreferrer"&gt;W3C WAI-ARIA APG: Combobox pattern&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dequeuniversity.com/rules/axe/4.10/button-name" rel="noopener noreferrer"&gt;Deque: axe button-name rule&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>a11y</category>
      <category>react</category>
      <category>webdev</category>
      <category>svg</category>
    </item>
    <item>
      <title>Six Icons for the Same Tool: Search by Meaning, Not Just Shape</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Wed, 04 Nov 2026 00:19:35 +0000</pubDate>
      <link>https://dev.to/svgicons/six-icons-for-the-same-tool-search-by-meaning-not-just-shape-bjp</link>
      <guid>https://dev.to/svgicons/six-icons-for-the-same-tool-search-by-meaning-not-just-shape-bjp</guid>
      <description>&lt;p&gt;You’re building a crop tool. You search for “crop grid icon,” find a clean SVG, and put it in the toolbar.&lt;/p&gt;

&lt;p&gt;Then you add six composition guides.&lt;/p&gt;

&lt;p&gt;The same grid now represents Rule of Thirds, Grid, Diagonal, Triangle, Golden Ratio, and Golden Spiral.&lt;/p&gt;

&lt;p&gt;The icon still looks good. But what does it tell the user about the selected mode?&lt;/p&gt;

&lt;p&gt;That is where icon selection becomes a problem of meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  A real example: six crop overlays
&lt;/h2&gt;

&lt;p&gt;A &lt;a href="https://github.com/storytold/photocraft/issues/10889" rel="noopener noreferrer"&gt;PhotoCraft feature request&lt;/a&gt; describes this situation: the crop overlay button displays a 3 × 3 grid, regardless of the selected overlay.&lt;/p&gt;

&lt;p&gt;The proposal asks for a distinct icon for each mode, shown beside its menu label. The toolbar button would also display the icon of the active overlay.&lt;/p&gt;

&lt;p&gt;The request calls for original drawings with a shared visual style and documented attribution.&lt;/p&gt;

&lt;p&gt;Sometimes the right result of an icon search is realizing that you need a small, purpose-built family.&lt;/p&gt;

&lt;p&gt;The illustrations in this article use original example drawings. They are not screenshots of PhotoCraft or icons taken from its repository.&lt;/p&gt;

&lt;h2&gt;
  
  
  First, decide what the icon represents
&lt;/h2&gt;

&lt;p&gt;Before searching, write down the role of the control.&lt;/p&gt;

&lt;p&gt;These are different jobs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Action:&lt;/strong&gt; crop the image.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Setting:&lt;/strong&gt; choose a composition guide.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;State:&lt;/strong&gt; show which guide is currently active.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A generic crop symbol can represent the action. It says much less about the selected guide.&lt;/p&gt;

&lt;p&gt;For the overlay selector, a more useful brief is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Help the user distinguish this composition guide from the other five.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That sentence gives you a way to reject attractive but misleading results.&lt;/p&gt;

&lt;p&gt;A table icon might resemble a grid. A shuffle icon might contain diagonals. Neither necessarily explains a crop overlay.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn the brief into search terms
&lt;/h2&gt;

&lt;p&gt;Start with the exact concept, then expand into related vocabulary.&lt;/p&gt;

&lt;p&gt;For this example, I would build the following search shortlist:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Intended meaning&lt;/th&gt;
&lt;th&gt;Search phrases to try&lt;/th&gt;
&lt;th&gt;Distinction to preserve&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Rule of Thirds&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;rule of thirds&lt;/code&gt;, &lt;code&gt;thirds guide&lt;/code&gt;, &lt;code&gt;composition grid&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Three equal divisions on each axis&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Grid&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;grid overlay&lt;/code&gt;, &lt;code&gt;composition grid&lt;/code&gt;, &lt;code&gt;alignment grid&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;A visibly denser guide&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Diagonal&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;diagonal guide&lt;/code&gt;, &lt;code&gt;diagonal composition&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Diagonal structure&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Triangle&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;triangle composition&lt;/code&gt;, &lt;code&gt;golden triangle guide&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;The guide geometry, rather than a generic triangle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Golden Ratio&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;golden ratio grid&lt;/code&gt;, &lt;code&gt;phi grid&lt;/code&gt;, &lt;code&gt;golden section&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;Unequal spacing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Golden Spiral&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;golden spiral&lt;/code&gt;, &lt;code&gt;composition spiral&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;An inward spiral&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;These are search suggestions, not a claim that any particular library contains all six.&lt;/p&gt;

&lt;p&gt;Broadening the vocabulary helps discovery. It should not weaken the acceptance criteria.&lt;/p&gt;

&lt;p&gt;For example, “spiral” may return loading indicators, weather symbols, or decorative swirls. Those are related shapes, but they may suggest entirely different behavior.&lt;/p&gt;

&lt;p&gt;Search broadly. Select precisely.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compare the nearest neighbors
&lt;/h2&gt;

&lt;p&gt;The hardest question is usually not whether an icon works on its own.&lt;/p&gt;

&lt;p&gt;It is whether it looks too much like another option.&lt;/p&gt;

&lt;p&gt;In this family, the critical comparisons are:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of Thirds versus Grid.&lt;/strong&gt; Both use horizontal and vertical lines. If their density becomes indistinguishable at the displayed size, their shared style has erased the useful difference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Rule of Thirds versus Golden Ratio.&lt;/strong&gt; Their spacing carries the distinction. A small change in line position may be difficult to notice in a compact menu.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Diagonal versus Triangle.&lt;/strong&gt; Both rely on diagonal strokes. The defining geometry must survive reduction.&lt;/p&gt;

&lt;p&gt;Place the most similar candidates next to each other before reviewing the whole family. Ask what visible feature lets someone tell them apart.&lt;/p&gt;

&lt;p&gt;If the answer requires zooming in, reconsider the drawing—or give the label more responsibility.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the visual grammar consistent
&lt;/h2&gt;

&lt;p&gt;Once the meanings are right, review the family as a whole.&lt;/p&gt;

&lt;p&gt;Use a consistent approach to stroke weight, line endings, framing, internal padding, and visual density.&lt;/p&gt;

&lt;p&gt;But consistency does not mean making every icon equally complex.&lt;/p&gt;

&lt;p&gt;A spiral and a grid contain different structures. Forcing them into identical amounts of detail can make both less useful.&lt;/p&gt;

&lt;p&gt;A shared SVG &lt;code&gt;viewBox&lt;/code&gt; also does not guarantee equal apparent size. One drawing may fill the available area while another occupies only its center.&lt;/p&gt;

&lt;p&gt;Compare the rendered symbols, not just their attributes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Inspect at the size people will actually see
&lt;/h2&gt;

&lt;p&gt;A large preview is useful for checking paths. It is insufficient for judging a menu icon.&lt;/p&gt;

&lt;p&gt;Place candidates at 16, 20, and 24 pixels, then include the actual size used by your interface if it differs.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmnf5vhk7hppltqw1rmt9.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmnf5vhk7hppltqw1rmt9.png" alt=" " width="800" height="580"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Each 1× sample occupies the stated number of pixels in the source PNG. The 3× views enlarge those same pixels without smoothing. Open the image at 100% zoom to inspect the native sizes; page scaling changes their apparent size.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;These samples were rasterized for the illustration. Check the actual SVGs in your target browser and display environment too: a static PNG does not reproduce every rendering condition.&lt;/p&gt;

&lt;p&gt;At each size, check:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whether nearby lines remain distinguishable.&lt;/li&gt;
&lt;li&gt;Whether the defining feature survives.&lt;/li&gt;
&lt;li&gt;Whether one icon appears heavier than the others.&lt;/li&gt;
&lt;li&gt;Whether selected and unselected states remain readable.&lt;/li&gt;
&lt;li&gt;Whether the family works against the intended backgrounds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat this as a visual inspection, not proof of recognition.&lt;/p&gt;

&lt;p&gt;To evaluate recognition, ask people to match the symbols to the six modes without revealing the answers first. Record which pairs they confuse. Then repeat the task with labels to assess the interface people will actually use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let the button show the current state
&lt;/h2&gt;

&lt;p&gt;If the selected guide changes, the toolbar can reflect that change.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frnbw4zfh72vs9cphq9xm.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Frnbw4zfh72vs9cphq9xm.png" alt=" " width="800" height="425"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Illustrative interface comparison. Both menus select Golden Spiral, but only the right-hand button reflects that selection.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The button can act as a reminder of the current setting while still opening the selection menu. Its icon should follow the underlying state, including changes made through keyboard shortcuts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let labels do their job
&lt;/h2&gt;

&lt;p&gt;Some composition guides are specialist concepts. An unfamiliar user may not recognize a golden-ratio grid regardless of how carefully it is drawn.&lt;/p&gt;

&lt;p&gt;Keep the visible names in the selection menu.&lt;/p&gt;

&lt;p&gt;For a compact toolbar button, provide an accessible name that communicates its purpose and current value, such as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Composition guide: Golden Spiral&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The graphic can provide a quick visual reminder. It does not need to carry every part of the explanation by itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Know when to stop searching
&lt;/h2&gt;

&lt;p&gt;An icon catalogue is useful for discovering vocabulary, comparing visual approaches, and finding existing assets.&lt;/p&gt;

&lt;p&gt;It cannot guarantee an exact match for every specialist concept.&lt;/p&gt;

&lt;p&gt;If five candidates fit and the sixth communicates the wrong thing, choosing it merely to complete the set creates a semantic inconsistency.&lt;/p&gt;

&lt;p&gt;At that point, consider drawing the family specifically for the feature. If you adapt existing assets, check the applicable licenses and keep their source and attribution information.&lt;/p&gt;

&lt;p&gt;Document original work too. Future maintainers should be able to tell where each asset came from.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start your next search with one sentence
&lt;/h2&gt;

&lt;p&gt;Before opening &lt;a href="https://svgicons.com/" rel="noopener noreferrer"&gt;SVGicons&lt;/a&gt; or another icon library, complete this sentence:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This icon should help the user distinguish ___ from ___.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;“Golden Ratio from Rule of Thirds” is a much stronger brief than “a nice grid.”&lt;/p&gt;

&lt;p&gt;It gives your search a purpose—and gives you a reason to reject an icon even when it looks perfect.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Which pair of icons has been hardest to distinguish in an interface you’ve built?&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>design</category>
      <category>ux</category>
      <category>svg</category>
    </item>
    <item>
      <title>Archive or Download? Give Your Toolbar the First-Click Test</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Tue, 03 Nov 2026 00:18:07 +0000</pubDate>
      <link>https://dev.to/svgicons/archive-or-download-give-your-toolbar-the-first-click-test-29id</link>
      <guid>https://dev.to/svgicons/archive-or-download-give-your-toolbar-the-first-click-test-29id</guid>
      <description>&lt;p&gt;You click the icon to save an invoice. The invoice disappears.&lt;/p&gt;

&lt;p&gt;Somewhere, a test is green. The Archive button did exactly what its developer intended.&lt;/p&gt;

&lt;p&gt;Here’s a question worth asking in your next pull request: &lt;strong&gt;before the click, what told the user where that file would end up?&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Give someone a task before you give them a hint
&lt;/h2&gt;

&lt;p&gt;Put two actions next to an invoice: a box with a lid for &lt;strong&gt;Archive&lt;/strong&gt;, and a downward arrow landing in a tray for &lt;strong&gt;Download&lt;/strong&gt;. Start with just the icons.&lt;/p&gt;

&lt;p&gt;It’s tempting to ask, “Which one is the Download button?” But that gives away the name of the control. Try this instead:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You need a copy of this invoice on your laptop so you can open it on the train. What would you click?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Watch the first click. Then ask: &lt;strong&gt;“What did you expect to happen to the invoice in the inbox?”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That second question matters. Someone can pick the intended button and still expect the file to &lt;em&gt;move&lt;/em&gt; to their laptop. Your implementation makes a &lt;em&gt;copy&lt;/em&gt;. A first-click score alone misses that difference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it with one HTML file
&lt;/h2&gt;

&lt;p&gt;Save this as &lt;code&gt;toolbar.html&lt;/code&gt; and open it in your browser. &lt;strong&gt;Archive&lt;/strong&gt; moves a mock invoice out of the inbox. &lt;strong&gt;Download&lt;/strong&gt; saves a small text file and leaves the original in place. Tick &lt;strong&gt;Show labels&lt;/strong&gt; to reveal the words beside the same two SVGs. Reload to reset.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Invoice toolbar experiment&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.5&lt;/span&gt; &lt;span class="n"&gt;system-ui&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#202124&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.action&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inline-flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.45rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.65rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="nx"&gt;#767676&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.4rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;text-decoration&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.action&lt;/span&gt;&lt;span class="nd"&gt;:focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="nx"&gt;#145dcc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;outline-offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;currentColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;stroke-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.8&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;stroke-linecap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="py"&gt;stroke-linejoin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;round&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.caption&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nf"&gt;#labels&lt;/span&gt;&lt;span class="nd"&gt;:checked&lt;/span&gt; &lt;span class="o"&gt;~&lt;/span&gt; &lt;span class="nf"&gt;#invoice&lt;/span&gt; &lt;span class="nc"&gt;.caption&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inline&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Inbox&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"labels"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"checkbox"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for=&lt;/span&gt;&lt;span class="s"&gt;"labels"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Show labels&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"invoice"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Invoice-1042.txt&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"action"&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"archive"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Archive"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&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;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&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;"M3 4h18v4H3z M5 8v12h14V8 M10 12h4"&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;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"caption"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Archive&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"action"&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Download"&lt;/span&gt; &lt;span class="na"&gt;download=&lt;/span&gt;&lt;span class="s"&gt;"Invoice-1042.txt"&lt;/span&gt;
     &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"data:text/plain;charset=utf-8,Invoice%201042%0ATotal%3A%20EUR%2042"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&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;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&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;"M12 3v12m-5-5 5 5 5-5 M4 16v5h16v-5"&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;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"caption"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Download&lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Archive&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"archived"&lt;/span&gt; &lt;span class="na"&gt;role=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Empty&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#archive&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;click&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="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#invoice&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#archived&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;textContent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Invoice-1042.txt&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;#labels&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;focus&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Listen for the clue they actually used
&lt;/h2&gt;

&lt;p&gt;“I followed the arrow” and “I usually find Download on the right” could produce the same click. Only the first answer tells you the drawing helped. The second gives you a reason to check what happens when the toolbar wraps or the actions move into a menu.&lt;/p&gt;

&lt;p&gt;Those are examples of what to listen for. When you run the exercise, write down the person’s own words.&lt;/p&gt;

&lt;p&gt;Now turn on &lt;strong&gt;Show labels&lt;/strong&gt;. If you’re reviewing the design together, ask what became clearer. If you want to compare &lt;em&gt;first&lt;/em&gt; clicks, show the labeled version to a fresh reader. The first person has already learned what the box does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I’d change in the pull request
&lt;/h2&gt;

&lt;p&gt;Both icons use the same size, stroke weight and color. The controls also have accessible names. That makes it possible to write a test such as &lt;code&gt;getByRole('link', { name: 'Download' })&lt;/code&gt;. It tells you the link can be found by that name. A sighted reader looking at the unlabeled toolbar still has to get there from the drawing.&lt;/p&gt;

&lt;p&gt;If people recognize the download arrow but hesitate over the archive box, I’d start with a one-word change: put &lt;strong&gt;Archive&lt;/strong&gt; beside the box. Then repeat the task at the width where the toolbar actually ships.&lt;/p&gt;

&lt;p&gt;The question I’d leave on the pull request is simple: &lt;strong&gt;“Can someone tell which click keeps the invoice in their inbox?”&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
      <category>accesibilty</category>
      <category>html</category>
    </item>
    <item>
      <title>Why Does My SVG Icon’s Handle Stay Black? Debugging a Sprite with DevTools</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Mon, 02 Nov 2026 17:49:31 +0000</pubDate>
      <link>https://dev.to/svgicons/why-does-my-svg-icons-why-does-my-svg-icons-handle-stay-black-debugging-a-sprite-with-devtools-220</link>
      <guid>https://dev.to/svgicons/why-does-my-svg-icons-why-does-my-svg-icons-handle-stay-black-debugging-a-sprite-with-devtools-220</guid>
      <description>&lt;p&gt;Hover over the Search button. The word turns purple. So does the ring of the magnifying glass. Its handle stays black.&lt;/p&gt;

&lt;p&gt;That ring is a useful clue. The button’s hover rule works, and its color reaches the icon. Before changing any CSS, look at what draws the handle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reproduce the two-color magnifier
&lt;/h2&gt;

&lt;p&gt;Save this snippet as &lt;code&gt;demo.html&lt;/code&gt; and open it in a browser. Hover over the button, or press Tab to focus it. The deliberately large icon makes the short black line easy to spot.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;Find the black handle&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;style&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inline-flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.4em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.4em&lt;/span&gt; &lt;span class="m"&gt;.7em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#111&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;currentColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.4em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt; &lt;span class="n"&gt;system-ui&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nd"&gt;:hover&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nd"&gt;:focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#6932bc&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="nd"&gt;:focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;currentColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;outline-offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&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;"0"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"0"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"position:absolute"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;symbol&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"search"&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="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;g&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt; &lt;span class="na"&gt;stroke=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;stroke-width=&lt;/span&gt;&lt;span class="s"&gt;"2.5"&lt;/span&gt; &lt;span class="na"&gt;stroke-linecap=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;circle&lt;/span&gt; &lt;span class="na"&gt;cx=&lt;/span&gt;&lt;span class="s"&gt;"10"&lt;/span&gt; &lt;span class="na"&gt;cy=&lt;/span&gt;&lt;span class="s"&gt;"10"&lt;/span&gt; &lt;span class="na"&gt;r=&lt;/span&gt;&lt;span class="s"&gt;"6"&lt;/span&gt;&lt;span class="nt"&gt;/&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;"M14.3 14.3 20 20"&lt;/span&gt; &lt;span class="na"&gt;stroke=&lt;/span&gt;&lt;span class="s"&gt;"#111"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/g&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/symbol&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&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;"32"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"32"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#search"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
  Search
&lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At rest, everything looks right because the button and the handle happen to use the same shade of black. The defect only appears when their colors should change together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Follow the reference in DevTools
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Inspect the Search button. Under its visible SVG you’ll find &lt;code&gt;&amp;lt;use href="#search"&amp;gt;&lt;/code&gt;. That fragment points to the drawing shared by every instance of this icon.&lt;/li&gt;
&lt;li&gt;In the Elements panel, press Ctrl+F (Cmd+F on macOS) and search for &lt;code&gt;symbol#search&lt;/code&gt;. Expand the symbol and its group. The circle draws the lens. The short path draws the handle.&lt;/li&gt;
&lt;li&gt;Compare the two shapes. The circle has no stroke value of its own, so it inherits the group’s stroke. The path explicitly requests &lt;code&gt;#111&lt;/code&gt;. Changing the button’s color can’t change that literal value.&lt;/li&gt;
&lt;li&gt;Double-click the path’s &lt;code&gt;stroke="#111"&lt;/code&gt; attribute in the Elements panel, delete the attribute and press Enter. Move the pointer back over the button. The handle should now turn purple with the ring.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Keep the one-line fix
&lt;/h2&gt;

&lt;p&gt;The DevTools edit disappears when you reload. Make the same change in the source that produces the sprite:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight diff"&gt;&lt;code&gt;&lt;span class="gd"&gt;- &amp;lt;path d="M14.3 14.3 20 20" stroke="#111"/&amp;gt;
&lt;/span&gt;&lt;span class="gi"&gt;+ &amp;lt;path d="M14.3 14.3 20 20"/&amp;gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The group already defines the stroke for the whole magnifier. Removing the handle’s override lets both shapes follow the same rule. If your sprite is generated, edit the input icon and regenerate it so the next build keeps the fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check the state that exposed it
&lt;/h2&gt;

&lt;p&gt;Reload, then press Tab with the pointer away from the button. The focus outline, label, ring and handle should all turn purple. Move focus away and they should return to black. A screenshot of the idle button alone would look identical before and after the repair.&lt;/p&gt;

&lt;p&gt;Apply this edit only to shapes intended to follow the text color. An amber status dot inside an otherwise monochrome icon may have a fixed fill for a reason.&lt;/p&gt;

&lt;p&gt;For the steps that turn individual icons into reusable symbols, see our &lt;a href="https://dev.to/svgicons/how-to-create-an-svg-icon-sprite-for-your-website-nak"&gt;SVG sprite tutorial&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>svg</category>
      <category>css</category>
      <category>html</category>
      <category>debugging</category>
    </item>
    <item>
      <title>How to Create an SVG Icon Sprite for Your Website</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Sun, 01 Nov 2026 00:46:17 +0000</pubDate>
      <link>https://dev.to/svgicons/how-to-create-an-svg-icon-sprite-for-your-website-nak</link>
      <guid>https://dev.to/svgicons/how-to-create-an-svg-icon-sprite-for-your-website-nak</guid>
      <description>&lt;p&gt;Build a small navigation example with Home, Search, and a dismiss button using three icons from the same set. You will paste SVG code into the &lt;a href="https://svgicons.com/tools/svg-sprite-generator" rel="noopener noreferrer"&gt;free SVG Sprite Generator&lt;/a&gt;, copy its output, and use the resulting symbols in a web page. No framework or build plugin is needed.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgrtuuty3a4sf9v0nn3lb.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgrtuuty3a4sf9v0nn3lb.png" alt="Navigation demo showing Home, Search and a dismiss button" width="800" height="618"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the generated sprite is included in your page, a visible icon needs only a reference to its symbol. Here is the Home link used in this example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#home"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#icon-home"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
  Home
&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.icon&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="py"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;currentColor&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;/div&gt;



&lt;p&gt;This short snippet assumes &lt;code&gt;icon-home&lt;/code&gt; is already defined in the document. The steps below create that definition; section 3 contains the complete page you can copy.&lt;/p&gt;

&lt;h2&gt;
  
  
  When a sprite fits
&lt;/h2&gt;

&lt;p&gt;A sprite defines each icon once inside a &lt;code&gt;&amp;lt;symbol&amp;gt;&lt;/code&gt;. An &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; containing &lt;code&gt;&amp;lt;use&amp;gt;&lt;/code&gt; draws an instance wherever you need it. This is useful for repeated icons in plain HTML, server templates, and documentation. A small, deliberately chosen set is easier to maintain than a bundle of every available icon.&lt;/p&gt;

&lt;p&gt;Sprites can reduce repeated markup, but they do not always improve performance. An inline sprite adds bytes to each HTML document; an external sprite needs a request but can be cached. Unused symbols still cost bytes. Measure your own pages. Separate SVGs or components may fit better when icons need different animations, per-instance path changes, or individual imports.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Choose three matching icons
&lt;/h2&gt;

&lt;p&gt;Use the 24-pixel solid variants from &lt;a href="https://svgicons.com/icon-set/heroicons-svg-icons" rel="noopener noreferrer"&gt;HeroIcons&lt;/a&gt;: &lt;a href="https://svgicons.com/icon/78217/home-solid" rel="noopener noreferrer"&gt;home-solid&lt;/a&gt;, &lt;a href="https://svgicons.com/icon/78288/magnifying-glass-solid" rel="noopener noreferrer"&gt;magnifying-glass-solid&lt;/a&gt;, and &lt;a href="https://svgicons.com/icon/78657/x-mark-solid" rel="noopener noreferrer"&gt;x-mark-solid&lt;/a&gt;. Keep the same variant and grid rather than mixing outline, 16-pixel, and solid artwork.&lt;/p&gt;

&lt;p&gt;On each icon page, use the basic &lt;strong&gt;Copy to Clipboard → SVG&lt;/strong&gt; action. Basic SVG copying is available without signing in; the separate download action requires a verified Member account. Neither an account nor Pro is required to use this generator. See &lt;a href="https://svgicons.com/docs/copy-svg" rel="noopener noreferrer"&gt;Copy SVG code&lt;/a&gt; for that workflow.&lt;/p&gt;

&lt;p&gt;The reproducible inputs below come from the same set's &lt;a href="https://github.com/tailwindlabs/heroicons/tree/v2.2.0/optimized/24/solid" rel="noopener noreferrer"&gt;official Heroicons v2.2.0 sources&lt;/a&gt;. They use a &lt;code&gt;0 0 24 24&lt;/code&gt; viewBox. Heroicons is distributed under the &lt;a href="https://github.com/tailwindlabs/heroicons/blob/v2.2.0/LICENSE" rel="noopener noreferrer"&gt;MIT license&lt;/a&gt;; retain its copyright and permission notice with redistributed copies. Save a copy of the linked license alongside your example as &lt;code&gt;LICENSE-heroicons.txt&lt;/code&gt;. The generator does not create a license manifest for you.&lt;/p&gt;

&lt;p&gt;For an exact reproduction, paste these complete SVG documents into separate input blocks:&lt;/p&gt;

&lt;h3&gt;
  
  
  Name: home
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&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="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;data-slot=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt;&lt;span class="nt"&gt;&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;"M11.47 3.841a.75.75 0 0 1 1.06 0l8.69 8.69a.75.75 0 1 0 1.06-1.061l-8.689-8.69a2.25 2.25 0 0 0-3.182 0l-8.69 8.69a.75.75 0 1 0 1.061 1.06l8.69-8.689Z"&lt;/span&gt;&lt;span class="nt"&gt;/&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;"m12 5.432 8.159 8.159c.03.03.06.058.091.086v6.198c0 1.035-.84 1.875-1.875 1.875H15a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 0-.75-.75h-3a.75.75 0 0 0-.75.75V21a.75.75 0 0 1-.75.75H5.625a1.875 1.875 0 0 1-1.875-1.875v-6.198a2.29 2.29 0 0 0 .091-.086L12 5.432Z"&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;
  
  
  Name: magnifying-glass
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&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="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;data-slot=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;fill-rule=&lt;/span&gt;&lt;span class="s"&gt;"evenodd"&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z"&lt;/span&gt; &lt;span class="na"&gt;clip-rule=&lt;/span&gt;&lt;span class="s"&gt;"evenodd"&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;
  
  
  Name: x-mark
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&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="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt; &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;data-slot=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;fill-rule=&lt;/span&gt;&lt;span class="s"&gt;"evenodd"&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z"&lt;/span&gt; &lt;span class="na"&gt;clip-rule=&lt;/span&gt;&lt;span class="s"&gt;"evenodd"&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;h2&gt;
  
  
  2. Generate the sprite
&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9yu3myrlimwgsgztwr4l.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9yu3myrlimwgsgztwr4l.png" alt="SVG Sprite Generator with three named Heroicons and generated output" width="800" height="874"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Open the &lt;a href="https://svgicons.com/tools/svg-sprite-generator" rel="noopener noreferrer"&gt;SVG Sprite Generator&lt;/a&gt;. It starts with two blocks named &lt;code&gt;icon-1&lt;/code&gt; and &lt;code&gt;icon-2&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; Replace the first name with &lt;code&gt;home&lt;/code&gt; and paste the home SVG. Name the second &lt;code&gt;magnifying-glass&lt;/code&gt; and paste its SVG.&lt;/li&gt;
&lt;li&gt; Click &lt;strong&gt;Add SVG Icon +&lt;/strong&gt;. Name the new block &lt;code&gt;x-mark&lt;/code&gt; and paste the third SVG. Use &lt;strong&gt;Remove&lt;/strong&gt; for unwanted blocks; a named empty block prevents generation.&lt;/li&gt;
&lt;li&gt; Under &lt;strong&gt;Options&lt;/strong&gt;, keep &lt;strong&gt;ID prefix&lt;/strong&gt; as &lt;code&gt;icon&lt;/code&gt;, &lt;strong&gt;Default size&lt;/strong&gt; as &lt;code&gt;24&lt;/code&gt;, and &lt;strong&gt;HTML mode&lt;/strong&gt; as &lt;strong&gt;Decorative&lt;/strong&gt;. Leave &lt;strong&gt;Hide sprite by default&lt;/strong&gt; and &lt;strong&gt;currentColor CSS helper&lt;/strong&gt; checked.&lt;/li&gt;
&lt;li&gt; Click &lt;strong&gt;Generate Sprite&lt;/strong&gt;. Check the previews and any errors or warnings. The output should contain &lt;code&gt;icon-home&lt;/code&gt;, &lt;code&gt;icon-magnifying-glass&lt;/code&gt;, and &lt;code&gt;icon-x-mark&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; Select the &lt;strong&gt;Sprite&lt;/strong&gt; tab and click &lt;strong&gt;Copy output&lt;/strong&gt;. The other tabs are &lt;strong&gt;HTML snippet&lt;/strong&gt;, &lt;strong&gt;CSS&lt;/strong&gt;, and &lt;strong&gt;React&lt;/strong&gt;. Copy each snippet you need.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This interface accepts pasted SVG markup, not uploaded files or a selection from Collections. It processes the markup in your browser. There is no file download button: you copy text and save files yourself. &lt;strong&gt;Load example set&lt;/strong&gt; replaces the inputs with the tool's own samples; &lt;strong&gt;Clear&lt;/strong&gt; restores two empty blocks. After editing names, SVGs, or options, click &lt;strong&gt;Generate Sprite&lt;/strong&gt; again before copying to avoid stale output.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Use the output in a web page
&lt;/h2&gt;

&lt;p&gt;Save the following as &lt;code&gt;index.html&lt;/code&gt;. The hidden SVG is the actual generated sprite. It belongs once inside the document body; the visible SVGs reference its symbol IDs. The Home and Search icons repeat link text, so they are decorative. The icon-only dismiss button has its accessible name on the button and actually hides the notice.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complete example: &lt;code&gt;index.html&lt;/code&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!doctype html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&lt;/span&gt; &lt;span class="na"&gt;lang=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;charset=&lt;/span&gt;&lt;span class="s"&gt;"utf-8"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;meta&lt;/span&gt; &lt;span class="na"&gt;name=&lt;/span&gt;&lt;span class="s"&gt;"viewport"&lt;/span&gt; &lt;span class="na"&gt;content=&lt;/span&gt;&lt;span class="s"&gt;"width=device-width, initial-scale=1"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;SVG sprite demo&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;style&amp;gt;body&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="m"&gt;1.5&lt;/span&gt; &lt;span class="n"&gt;system-ui&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sans-serif&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#163b66&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;nav&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;flex-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;wrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#eef4ff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="nx"&gt;#7c94ad&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.6rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;cursor&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;pointer&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nd"&gt;:focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="nx"&gt;#b45309&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;outline-offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.icon&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="py"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;currentColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;vertical-align&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-.125em&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.icon-button&lt;/span&gt; &lt;span class="nc"&gt;.icon&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;24px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.large&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#9f1239&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.dark&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;margin-top&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#e2e8f0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#172033&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/style&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
&lt;span class="c"&gt;&amp;lt;!-- Heroicons v2.2.0, MIT; see LICENSE-heroicons.txt. --&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;svg&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="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"position: absolute; width: 0; height: 0; overflow: hidden;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;symbol&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"icon-home"&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="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;g&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="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;&lt;span class="nt"&gt;&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;"M11.47 3.841a.75.75 0 0 1 1.06 0l8.69 8.69a.75.75 0 1 0 1.06-1.061l-8.689-8.69a2.25 2.25 0 0 0-3.182 0l-8.69 8.69a.75.75 0 1 0 1.061 1.06l8.69-8.689Z"&lt;/span&gt;&lt;span class="nt"&gt;/&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;"m12 5.432 8.159 8.159c.03.03.06.058.091.086v6.198c0 1.035-.84 1.875-1.875 1.875H15a.75.75 0 0 1-.75-.75v-4.5a.75.75 0 0 0-.75-.75h-3a.75.75 0 0 0-.75.75V21a.75.75 0 0 1-.75.75H5.625a1.875 1.875 0 0 1-1.875-1.875v-6.198a2.29 2.29 0 0 0 .091-.086L12 5.432Z"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/g&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/symbol&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;symbol&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"icon-magnifying-glass"&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="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;g&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="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;fill-rule=&lt;/span&gt;&lt;span class="s"&gt;"evenodd"&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M10.5 3.75a6.75 6.75 0 1 0 0 13.5 6.75 6.75 0 0 0 0-13.5ZM2.25 10.5a8.25 8.25 0 1 1 14.59 5.28l4.69 4.69a.75.75 0 1 1-1.06 1.06l-4.69-4.69A8.25 8.25 0 0 1 2.25 10.5Z"&lt;/span&gt; &lt;span class="na"&gt;clip-rule=&lt;/span&gt;&lt;span class="s"&gt;"evenodd"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/g&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/symbol&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;symbol&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"icon-x-mark"&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="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;g&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="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;path&lt;/span&gt; &lt;span class="na"&gt;fill-rule=&lt;/span&gt;&lt;span class="s"&gt;"evenodd"&lt;/span&gt; &lt;span class="na"&gt;d=&lt;/span&gt;&lt;span class="s"&gt;"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z"&lt;/span&gt; &lt;span class="na"&gt;clip-rule=&lt;/span&gt;&lt;span class="s"&gt;"evenodd"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/g&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/symbol&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;

&lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;SVG sprite demo&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;nav&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Demo navigation"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#home"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#icon-home"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt; Home&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;a&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#icon-magnifying-glass"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt; Search&lt;span class="nt"&gt;&amp;lt;/a&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon-button"&lt;/span&gt; &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Dismiss notice"&lt;/span&gt;
    &lt;span class="na"&gt;onclick=&lt;/span&gt;&lt;span class="s"&gt;"document.getElementById('notice').hidden = true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#icon-x-mark"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&amp;gt;&amp;lt;/svg&amp;gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/nav&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"notice"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;This is a dismissible demo notice.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"home"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Home&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&amp;lt;p&amp;gt;&lt;/span&gt;One sprite, three reusable symbols.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;section&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"search"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;h2&amp;gt;&lt;/span&gt;Search&lt;span class="nt"&gt;&amp;lt;/h2&amp;gt;&amp;lt;p&amp;gt;&lt;/span&gt;This link is a navigation example, not a search engine.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&amp;lt;/section&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"large"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#icon-home"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt; A larger, differently colored instance&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"dark"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#icon-magnifying-glass"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&amp;gt;&amp;lt;/svg&amp;gt;&lt;/span&gt; The same icon on a dark background&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Icons: Heroicons by Tailwind Labs / Refactoring UI Inc, MIT. Keep LICENSE-heroicons.txt with redistributed copies.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The generator produces the sprite and small snippets, not the surrounding page, navigation, or dismiss behavior. The example above supplies those parts. The generated wrapper is absolutely positioned with zero width and height, keeping referenced definitions available; its symbols are referenced by the visible SVG instances. Test this pattern with your target browsers, especially if you introduce gradients or filters.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Control size and color
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;viewBox&lt;/code&gt; describes the artwork's coordinate system, not its displayed pixel size. Keep it on each symbol. The CSS helper sets width and height to &lt;code&gt;1em&lt;/code&gt;, so these icons follow their element's font size. The 24-pixel width and height attributes in a generated snippet are overridden by that CSS. Our button deliberately overrides the helper with 24-pixel dimensions; the larger paragraph uses a 32-pixel font size.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;fill: currentColor&lt;/code&gt; makes this solid artwork follow CSS &lt;code&gt;color&lt;/code&gt;. Change the surrounding text color to recolor its icons. The helper does not rewrite hard-coded colors inside paths, and it is a fill helper, not a stroke conversion. Keep intentional multicolor artwork unchanged. See &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Values/color_value#currentcolor_keyword" rel="noopener noreferrer"&gt;MDN's currentColor reference&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Outline icons keep their paint settings.&lt;/strong&gt; Supported root presentation attributes, including &lt;code&gt;fill="none"&lt;/code&gt;, &lt;code&gt;stroke="currentColor"&lt;/code&gt;, and &lt;code&gt;stroke-width&lt;/code&gt;, are preserved on an internal group. Child shapes can still override them. Paste the complete SVG; no manual group wrapper is needed. The fill helper does not turn a preserved outline into a filled icon.&lt;/p&gt;

&lt;p&gt;The preview renders the generated symbol. Root &lt;code&gt;style&lt;/code&gt; and &lt;code&gt;class&lt;/code&gt; are not copied; use explicit SVG presentation attributes. Root viewport effects such as &lt;code&gt;clip-path&lt;/code&gt;, &lt;code&gt;mask&lt;/code&gt;, &lt;code&gt;filter&lt;/code&gt;, &lt;code&gt;transform&lt;/code&gt; and &lt;code&gt;vector-effect&lt;/code&gt; are not transferred and produce warnings. Review those warnings and the final appearance for complex artwork.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Optionally save an external sprite
&lt;/h2&gt;

&lt;p&gt;Save the copied Sprite output as &lt;code&gt;sprite.svg&lt;/code&gt; next to your HTML. Remove the inline sprite from that page and use a filename plus a fragment:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"sprite.svg#icon-home"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&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;p&gt;Keep the same CSS. Serve both files from the same origin using your project's local development server. Do not test external references by double-clicking the HTML file: &lt;code&gt;file://&lt;/code&gt; restrictions can prevent the SVG from loading. If Python is installed, run this command in the folder containing both files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; http.server 8000 &lt;span class="nt"&gt;--bind&lt;/span&gt; 127.0.0.1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open &lt;code&gt;http://127.0.0.1:8000/index.html&lt;/code&gt;. Stop the server with Ctrl+C. An external sprite requires deployment of the asset as well as the HTML; check its URL, response type, caching, and your browser support. Do not assume a sprite on another domain will work just by enabling CORS. &lt;a href="https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/use" rel="noopener noreferrer"&gt;MDN documents external use references and same-origin restrictions&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common problems and fixes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;No output:&lt;/strong&gt; remove unused empty blocks and paste one complete, valid SVG document per input. Fix the reported XML error before generating again.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Blank icon:&lt;/strong&gt; compare the exact &lt;code&gt;href&lt;/code&gt; fragment with the generated ID. A name like “Home Icon” becomes &lt;code&gt;icon-home-icon&lt;/code&gt;, not &lt;code&gt;icon-home&lt;/code&gt;. Keep input names unique and inspect final IDs; do not rely on suffixing to resolve every possible collision.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Wrong size or clipping:&lt;/strong&gt; preserve the source viewBox and check CSS dimensions. The tool can infer a viewBox from positive numeric width and height (including px), but it cannot recover arbitrary missing coordinate information.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Black or missing outline:&lt;/strong&gt; check the source fill and stroke settings and any generator warnings. A fixed fill on a child path will also override inherited color. Verify both light and dark backgrounds.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Broken gradients or masks:&lt;/strong&gt; review rewritten internal IDs and every reference. This tool removes some obvious unsafe content but is not a comprehensive sanitizer for untrusted SVG. Use reviewed sources.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;External sprite missing:&lt;/strong&gt; use HTTP, check the request succeeds, and keep the asset on the same origin. Recheck the deployed path after moving files.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Repeated or missing accessible labels:&lt;/strong&gt; hide decorative SVGs and name their controls. If you choose &lt;strong&gt;Labelled&lt;/strong&gt; mode for a meaningful standalone icon, adapt its title and make title IDs unique for every repeated instance. The generated title IDs are based on symbol names. See the &lt;a href="https://www.w3.org/WAI/ARIA/apg/patterns/button/" rel="noopener noreferrer"&gt;WAI button pattern&lt;/a&gt; and &lt;a href="https://svgicons.com/articles/svg-icon-accessibility-guide" rel="noopener noreferrer"&gt;SVG icon accessibility guide&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Keep the workflow small
&lt;/h2&gt;

&lt;p&gt;Start with three icons, review their actual use sites, and keep the source SVGs and license notice beside your generated output. Try the &lt;a href="https://svgicons.com/tools/svg-sprite-generator" rel="noopener noreferrer"&gt;SVG Sprite Generator&lt;/a&gt; with your next small set of interface icons.&lt;/p&gt;

&lt;p&gt;For more options, read the &lt;a href="https://svgicons.com/docs/svg-sprite-generator" rel="noopener noreferrer"&gt;generator documentation&lt;/a&gt;. If your project needs automated generation, see &lt;a href="https://svgicons.com/articles/build-svg-sprite-in-modern-builds" rel="noopener noreferrer"&gt;Build an SVG Sprite for Modern Vite, React, and Vue Apps&lt;/a&gt;. For per-icon components, see &lt;a href="https://svgicons.com/articles/use-svg-icons-in-react-with-vite-svgr" rel="noopener noreferrer"&gt;Use SVG Icons in React with Vite and SVGR&lt;/a&gt; or the [SVG to Component Converter](&lt;a href="https://svgicons.com/tools/svg-" rel="noopener noreferrer"&gt;https://svgicons.com/tools/svg-&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>svg</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Why Icons Lose Contrast on Translucent Cards</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Wed, 28 Oct 2026 17:17:57 +0000</pubDate>
      <link>https://dev.to/svgicons/why-icons-lose-contrast-on-translucent-cards-3512</link>
      <guid>https://dev.to/svgicons/why-icons-lose-contrast-on-translucent-cards-3512</guid>
      <description>&lt;p&gt;An icon can look clear in a component preview and become difficult to see when the background changes.&lt;/p&gt;

&lt;p&gt;In our test, the same download icon went from a minimum sampled contrast of &lt;strong&gt;4.42:1 on a light background to 1.04:1 on a dark background&lt;/strong&gt;. Its SVG, color and size stayed the same.&lt;/p&gt;

&lt;p&gt;The difference came from the translucent card behind it.&lt;/p&gt;

&lt;p&gt;We tested five backgrounds, then applied a simple correction: an opaque white surface behind the icon, while keeping the rest of the card translucent.&lt;/p&gt;

&lt;h2&gt;
  
  
  One icon, five backgrounds
&lt;/h2&gt;

&lt;p&gt;We used the &lt;a href="https://svgicons.com/icon/113147/download" rel="noopener noreferrer"&gt;Download icon from Lucide on SVGicons&lt;/a&gt;, by Lucide Contributors, under the &lt;a href="https://github.com/lucide-icons/lucide/blob/main/LICENSE" rel="noopener noreferrer"&gt;ISC license&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Every scene uses the same settings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Icon:&lt;/strong&gt; 32 × 32 pixels, colored &lt;code&gt;#64748b&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Button:&lt;/strong&gt; 48 × 48 pixels&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Card background:&lt;/strong&gt; white at 38% opacity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backdrop blur:&lt;/strong&gt; 12 pixels&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SVG geometry and card layout:&lt;/strong&gt; unchanged&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The original button has a transparent background. The corrected version adds an opaque white background to that button.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Light background
&lt;/h3&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fer4p8zhhou3o3elilvo0.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fer4p8zhhou3o3elilvo0.png" alt="Download icon on a light background, before and after adding an opaque white button" width="600" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The original icon is already easy to distinguish against this light card. Adding an opaque white button makes only a modest difference.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimum sampled contrast: 4.42:1 → 4.76:1.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Dark background
&lt;/h3&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9eqbd0t9ia2y5ayje0ol.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9eqbd0t9ia2y5ayje0ol.png" alt="Download icon on a dark background: contrast improves from 1.04:1 to 4.76:1 with an opaque white butto" width="600" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Over a dark background, the translucent card becomes darker too. The slate-colored icon now sits against a similar rendered color, making it much harder to distinguish.&lt;/p&gt;

&lt;p&gt;The white button restores separation without changing the SVG.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimum sampled contrast: 1.04:1 → 4.76:1.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Mid-tone background
&lt;/h3&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F28y8io8trm6jpw7jtvvy.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F28y8io8trm6jpw7jtvvy.png" alt="Download icon on a mid-tone background, before and after adding an opaque white button." width="600" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A background does not have to be very dark to reduce contrast. This mid-tone scene also brings the card’s rendered color closer to the icon’s color.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimum sampled contrast: 2.72:1 → 4.76:1.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Gradient background
&lt;/h3&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg5f128u28jyouom0xtax.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fg5f128u28jyouom0xtax.png" alt="Download icon on a gradient background, before and after adding an opaque white button." width="600" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With a gradient, the colors next to the icon’s strokes depend on their position. Measuring against a color picked elsewhere on the card can miss the weakest local contrast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimum sampled contrast: 1.68:1 → 4.76:1.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Photographic background
&lt;/h3&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flcxu7bawsl45ynz3tcn2.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Flcxu7bawsl45ynz3tcn2.png" alt="Download icon over a photograph, before and after adding an opaque white button." width="600" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;A photograph introduces variations in brightness and color. Blur softens those variations, but does not guarantee sufficient contrast around the icon.&lt;/p&gt;

&lt;p&gt;The corrected button keeps the photograph visible through the card while giving the icon a predictable local background.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Minimum sampled contrast: 1.58:1 → 4.76:1.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Photograph: &lt;a href="https://commons.wikimedia.org/wiki/File:Fronalpstock_big.jpg" rel="noopener noreferrer"&gt;Fronalpstock big.jpg&lt;/a&gt;, by Hannes Röst / Wikimedia Commons, licensed under &lt;a href="https://creativecommons.org/licenses/by-sa/3.0/" rel="noopener noreferrer"&gt;CC BY-SA 3.0&lt;/a&gt;. We used a centered cover crop of the 1280 × 575 thumbnail. The photographic crop and its adaptations in these comparison images retain that license.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The results
&lt;/h2&gt;

&lt;p&gt;These are the &lt;strong&gt;minimum sampled contrast ratios&lt;/strong&gt; for the recorded settings, rounded to two decimal places.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Background&lt;/th&gt;
&lt;th&gt;Original button&lt;/th&gt;
&lt;th&gt;Opaque white button&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Light — &lt;code&gt;#f4f4f5&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;4.42:1&lt;/td&gt;
&lt;td&gt;4.76:1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dark — &lt;code&gt;#18181b&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;1.04:1&lt;/td&gt;
&lt;td&gt;4.76:1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Mid-tone — &lt;code&gt;#94a3b8&lt;/code&gt;
&lt;/td&gt;
&lt;td&gt;2.72:1&lt;/td&gt;
&lt;td&gt;4.76:1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Light-to-navy gradient&lt;/td&gt;
&lt;td&gt;1.68:1&lt;/td&gt;
&lt;td&gt;4.76:1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Photograph&lt;/td&gt;
&lt;td&gt;1.58:1&lt;/td&gt;
&lt;td&gt;4.76:1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The same SVG produces very different results because the background immediately around its strokes changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why an opaque button helps
&lt;/h2&gt;

&lt;p&gt;A white translucent card is not a solid white background. Its final appearance depends on what is behind it and how the browser renders the backdrop filter.&lt;/p&gt;

&lt;p&gt;Comparing the original icon with solid white would therefore give the wrong picture. Comparing it with the raw photograph would also skip the card’s transparency and blur.&lt;/p&gt;

&lt;p&gt;The correction gives the icon an &lt;strong&gt;opaque local surface&lt;/strong&gt;. The rest of the card remains translucent, but the backdrop can no longer change the color immediately around the strokes.&lt;/p&gt;

&lt;p&gt;In these five recorded cases, the white surface produces a minimum sampled contrast of &lt;strong&gt;4.76:1&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;White is not a universal requirement. A dark surface and a light icon can serve the same purpose. The important part is choosing and testing the foreground and background together.&lt;/p&gt;

&lt;h2&gt;
  
  
  A reusable HTML/CSS example
&lt;/h2&gt;

&lt;p&gt;This minimal example demonstrates the correction using the same Download geometry. It is not the complete measured scene.&lt;/p&gt;

&lt;p&gt;Connect the button to your application’s download handler and keep its accessible name specific to the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"file-card"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Field notes&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;

  &lt;span class="nt"&gt;&amp;lt;button&lt;/span&gt;
    &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"download"&lt;/span&gt;
    &lt;span class="na"&gt;type=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;
    &lt;span class="na"&gt;aria-label=&lt;/span&gt;&lt;span class="s"&gt;"Download field notes"&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;svg&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="na"&gt;viewBox=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;
      &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"32"&lt;/span&gt;
      &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"32"&lt;/span&gt;
      &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
      &lt;span class="na"&gt;focusable=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;g&lt;/span&gt;
        &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
        &lt;span class="na"&gt;stroke=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;
        &lt;span class="na"&gt;stroke-linecap=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
        &lt;span class="na"&gt;stroke-linejoin=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
        &lt;span class="na"&gt;stroke-width=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;
      &lt;span class="nt"&gt;&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;"M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"&lt;/span&gt;&lt;span class="nt"&gt;/&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;"m7 10l5 5l5-5"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="nt"&gt;&amp;lt;/g&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/svg&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/button&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.file-card&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;255&lt;/span&gt; &lt;span class="m"&gt;255&lt;/span&gt; &lt;span class="m"&gt;255&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="m"&gt;0.38&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;backdrop-filter&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;blur&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;12px&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.download&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;box-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;border-box&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;place-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;48px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;48px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;12px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#64748b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.download&lt;/span&gt; &lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;32px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.download&lt;/span&gt;&lt;span class="nd"&gt;:focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="nx"&gt;#2563eb&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;outline-offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4px&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;/div&gt;



&lt;p&gt;&lt;strong&gt;An accessible name and visual contrast solve different problems.&lt;/strong&gt; The &lt;code&gt;aria-label&lt;/code&gt; identifies the action for assistive technology. It does not make a low-contrast icon easier to see.&lt;/p&gt;

&lt;p&gt;The SVG is hidden from assistive technology because the button already supplies the action’s name. The focus indicator needs its own contrast check against the surrounding interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  How we measured
&lt;/h2&gt;

&lt;p&gt;We sampled colors from browser captures after transparency and blur had been rendered.&lt;/p&gt;

&lt;p&gt;For each case, we captured:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The normal scene with the icon visible.&lt;/li&gt;
&lt;li&gt;The same scene with only the SVG hidden using &lt;code&gt;visibility: hidden&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;A separate mask of the SVG geometry to locate the solid cores of its strokes.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Hiding the SVG preserved the card, button, filters and layout. This provided the composited background for comparison.&lt;/p&gt;

&lt;p&gt;The script compared foreground stroke-core pixels with the nearest fully unpainted adjacent background pixels within four device pixels. Antialiased stroke edges were excluded so blended fringe colors were not treated as the icon’s intended color.&lt;/p&gt;

&lt;p&gt;Contrast was calculated using the WCAG relative-luminance formula. Sample coordinates, RGB values and minimum locations were recorded.&lt;/p&gt;

&lt;p&gt;The test used Chromium 156.0.8078.4 on Windows, Playwright 1.64.1, a 1600 × 1120 viewport, device scale 1, forced sRGB and a fixed photographic crop.&lt;/p&gt;

&lt;p&gt;The original and corrected rows occupied slightly different subpixel positions, so their accepted stroke-core sample counts differed. These measurements are finite samples, not an exhaustive analysis of every pixel.&lt;/p&gt;

&lt;h2&gt;
  
  
  What these numbers do—and do not—mean
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.w3.org/WAI/WCAG21/Techniques/general/G207" rel="noopener noreferrer"&gt;W3C technique G207&lt;/a&gt; discusses a contrast ratio of at least &lt;strong&gt;3:1&lt;/strong&gt; for icons required to understand content.&lt;/p&gt;

&lt;p&gt;It also considers whether an icon remains understandable when its insufficiently contrasting portions are treated as invisible.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A low sampled value is not an automatic failure verdict for the entire icon.&lt;/strong&gt; Our script measures contrast; it does not decide whether the remaining shape still communicates its meaning.&lt;/p&gt;

&lt;p&gt;This case study does not establish full WCAG compliance. We did not measure card text, control boundaries, hover and focus contrast, other browsers, display scales or forced-color modes. No human screen-reader session was performed.&lt;/p&gt;

&lt;p&gt;The results apply to the recorded configuration. Changes to opacity, blur, icon color, image crop or layout require another check.&lt;/p&gt;

&lt;h2&gt;
  
  
  What to take into your next interface
&lt;/h2&gt;

&lt;p&gt;When placing an icon on a translucent surface:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Test it over the backgrounds users will actually encounter.&lt;/li&gt;
&lt;li&gt;Check the rendered colors next to the icon, rather than the card’s CSS tint alone.&lt;/li&gt;
&lt;li&gt;Do not assume backdrop blur will preserve contrast.&lt;/li&gt;
&lt;li&gt;Consider an opaque local surface when the background can vary.&lt;/li&gt;
&lt;li&gt;Check accessible naming, keyboard focus and interaction states separately.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The SVG is only one part of the result. Its surroundings determine whether people can see it.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>accessibily</category>
      <category>css</category>
      <category>design</category>
    </item>
    <item>
      <title>Why Dark Mode Tests Don’t Cover Windows Contrast Themes</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Sat, 24 Oct 2026 14:43:13 +0000</pubDate>
      <link>https://dev.to/svgicons/why-dark-mode-tests-dont-cover-windows-contrast-themes-gkl</link>
      <guid>https://dev.to/svgicons/why-dark-mode-tests-dont-cover-windows-contrast-themes-gkl</guid>
      <description>&lt;p&gt;A toolbar can look correct in light and dark mode and still become difficult to use with a Windows contrast theme.&lt;/p&gt;

&lt;p&gt;The missing check is &lt;strong&gt;forced colors&lt;/strong&gt;: a browser mode that applies a restricted, user-selected palette to the page.&lt;/p&gt;

&lt;p&gt;For SVG icons, this raises a different question from ordinary theme support:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;When the surrounding interface changes to system colors, does the icon remain recognizable—and does the control still look like a control?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This article explains the documented behavior and a practical way to check it. It does not present results from a completed Windows browser comparison.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the rendered control
&lt;/h2&gt;

&lt;p&gt;A contrast calculation evaluates a foreground against a background. But the colors you authored are not necessarily the colors the browser paints in forced colors mode.&lt;/p&gt;

&lt;p&gt;A button might normally use:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a colored background;&lt;/li&gt;
&lt;li&gt;a white icon;&lt;/li&gt;
&lt;li&gt;a subtle shadow;&lt;/li&gt;
&lt;li&gt;a different background for its selected state.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When the browser applies the user's palette, some of those distinctions can change or disappear.&lt;/p&gt;

&lt;p&gt;The useful unit to review is therefore the whole control: its icon, label, boundary, focus indicator, and state.&lt;/p&gt;

&lt;p&gt;An SVG can remain present in the DOM while becoming difficult to distinguish visually. A button can remain clickable while losing the visual cues that explain what it does.&lt;/p&gt;

&lt;h2&gt;
  
  
  What changes in forced colors?
&lt;/h2&gt;

&lt;p&gt;The &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/forced-colors" rel="noopener noreferrer"&gt;&lt;code&gt;forced-colors&lt;/code&gt; media feature&lt;/a&gt; detects whether the browser is enforcing a restricted palette.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;forced-colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;active&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c"&gt;/* Targeted adjustments for the user's palette */&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;MDN documents adjustments to text, backgrounds, borders, and SVG paint properties. It also documents the removal of box shadows and non-URL background images, including CSS gradients.&lt;/p&gt;

&lt;p&gt;Two details matter for icons:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A URL-based SVG background is not automatically removed by the rule that removes gradients.&lt;/strong&gt; Its artwork may still become difficult to see against the changed surface.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SVG has specific color-adjustment behavior.&lt;/strong&gt; The CSS specification describes &lt;code&gt;preserve-parent-color&lt;/code&gt;, which allows embedded SVG to receive its parent's adjusted text color while otherwise preserving artwork colors.&lt;/p&gt;

&lt;p&gt;That makes blanket statements such as “forced colors recolors every SVG path” unreliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep monochrome action icons connected to text
&lt;/h2&gt;

&lt;p&gt;For a monochrome icon inside a button, using &lt;code&gt;currentColor&lt;/code&gt; for the appropriate fill or stroke lets the artwork follow the control's text color.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;DownloadButton&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&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;"action"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;
        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt;
        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"24"&lt;/span&gt;
        &lt;span class="na"&gt;viewBox&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"0 0 24 24"&lt;/span&gt;
        &lt;span class="na"&gt;fill&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
        &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
        &lt;span class="na"&gt;focusable&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;path&lt;/span&gt;
          &lt;span class="na"&gt;d&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"M12 3v12m-5-5 5 5 5-5M5 17v4h14v-4"&lt;/span&gt;
          &lt;span class="na"&gt;stroke&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;
          &lt;span class="na"&gt;strokeWidth&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;
          &lt;span class="na"&gt;strokeLinecap&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
          &lt;span class="na"&gt;strokeLinejoin&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"round"&lt;/span&gt;
        &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;

      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;Download report&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;The SVG does not introduce a separate text color. Its stroke follows the inherited &lt;code&gt;color&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;This example uses simple illustrative geometry. When adapting an existing icon, preserve the distinction between fill and stroke. Replacing every paint value indiscriminately can change the artwork.&lt;/p&gt;

&lt;p&gt;For a broader explanation of integration methods, see &lt;a href="https://dev.to/svgicons/same-svg-different-runtime-why-css-inline-svg-and-are-not-equivalent-551d"&gt;Same SVG, Different Runtime&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The important reminder here is that an external SVG loaded through &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt; does not inherit the surrounding button's text color into its internal paths. Adding &lt;code&gt;currentColor&lt;/code&gt; inside that file does not create the same inheritance relationship as inline SVG.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check whether the button boundary survives
&lt;/h2&gt;

&lt;p&gt;An icon is only one part of the control.&lt;/p&gt;

&lt;p&gt;If a button depends entirely on a shadow to separate it from its surroundings, removing that shadow can make the boundary unclear.&lt;/p&gt;

&lt;p&gt;A transparent border reserves space in the ordinary design. A targeted rule can then give that border a system color:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.action&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inline-flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.5rem&lt;/span&gt; &lt;span class="m"&gt;0.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#17324d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;#edf3f9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="nb"&gt;transparent&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0.375rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.action&lt;/span&gt; &lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.action&lt;/span&gt;&lt;span class="nd"&gt;:focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;outline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="n"&gt;currentColor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;outline-offset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;forced-colors&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;active&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nc"&gt;.action&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;border-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;ButtonText&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nc"&gt;.action&lt;/span&gt;&lt;span class="nd"&gt;:focus-visible&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;outline-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Highlight&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;/div&gt;



&lt;p&gt;&lt;code&gt;ButtonText&lt;/code&gt; and &lt;code&gt;Highlight&lt;/code&gt; refer to the active system palette.&lt;/p&gt;

&lt;p&gt;Treat this as a starting pattern to inspect in context. A default button, a disabled button, and a selected toggle have different communication requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don’t preserve the entire design with an opt-out
&lt;/h2&gt;

&lt;p&gt;This rule may appear to solve unexpected changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.application&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;forced-color-adjust&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&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;/div&gt;



&lt;p&gt;But it disables automatic color adjustment throughout that subtree.&lt;/p&gt;

&lt;p&gt;That can preserve the same color combinations the user enabled a contrast theme to avoid.&lt;/p&gt;

&lt;p&gt;Keep any exception narrowly scoped. A color swatch may need to preserve a particular color because that color is the information. An ordinary toolbar usually benefits from following the user's palette.&lt;/p&gt;

&lt;p&gt;If an exception is necessary, check both the preserved artwork and its contrast against the surrounding interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test states, not just screenshots of the default theme
&lt;/h2&gt;

&lt;p&gt;A useful review should answer specific questions:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Check&lt;/th&gt;
&lt;th&gt;Question&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Icon&lt;/td&gt;
&lt;td&gt;Can its shape still be distinguished from the surface?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Label&lt;/td&gt;
&lt;td&gt;Is the action understandable if the icon is unclear?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Boundary&lt;/td&gt;
&lt;td&gt;Can users identify the clickable control?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Keyboard focus&lt;/td&gt;
&lt;td&gt;Is the focused control visibly indicated?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Selected state&lt;/td&gt;
&lt;td&gt;Can users distinguish selected from unselected?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disabled state&lt;/td&gt;
&lt;td&gt;Is the unavailable state still recognizable?&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;For a toggle, exposing &lt;code&gt;aria-pressed&lt;/code&gt; communicates its state to assistive technology. Sighted users also need a visible indication that survives the active palette.&lt;/p&gt;

&lt;p&gt;Similarly, an accessible name on an icon-only button does not resolve an invisible icon for a sighted user.&lt;/p&gt;

&lt;p&gt;Both forms of communication need review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use emulation during development, then check Windows
&lt;/h2&gt;

&lt;p&gt;Browser emulation is useful for finding problems early.&lt;/p&gt;

&lt;p&gt;You can confirm that the browser reports forced colors with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;matchMedia&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;(forced-colors: active)&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A &lt;code&gt;true&lt;/code&gt; result confirms that the media query matches. It does not confirm that the interface is usable.&lt;/p&gt;

&lt;p&gt;For a Windows-focused check, use actual Windows contrast themes as well:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open the interface in a browser you support.&lt;/li&gt;
&lt;li&gt;Enable a contrast theme with a dark canvas.&lt;/li&gt;
&lt;li&gt;Inspect the controls and navigate with the keyboard.&lt;/li&gt;
&lt;li&gt;Repeat with a contrast theme with a light canvas.&lt;/li&gt;
&lt;li&gt;Check selected, disabled, hover, and focus states where applicable.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Record the Windows version, browser version, theme name, and whether the test used OS settings or emulation.&lt;/p&gt;

&lt;p&gt;Label screenshots accordingly. An emulated browser capture should not be presented as a capture of an actual Windows contrast theme.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make an icon comparison reproducible
&lt;/h2&gt;

&lt;p&gt;If you compare integration methods, keep the artwork constant.&lt;/p&gt;

&lt;p&gt;Choose a small group of monochrome icons from one family and save:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the exact SVG files;&lt;/li&gt;
&lt;li&gt;their source URLs;&lt;/li&gt;
&lt;li&gt;the applicable license information;&lt;/li&gt;
&lt;li&gt;any changes made to fill, stroke, or color;&lt;/li&gt;
&lt;li&gt;the component code and test conditions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Then compare inline SVG, &lt;code&gt;&amp;lt;img&amp;gt;&lt;/code&gt;, and URL-based CSS backgrounds using the same geometry.&lt;/p&gt;

&lt;p&gt;This separates differences caused by integration from differences introduced while preparing the assets.&lt;/p&gt;

&lt;p&gt;A collection exported from SVGicons can provide the source assets, but the exported files are only the beginning. The component that renders them still needs inspection in the target environment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Add forced colors to the review
&lt;/h2&gt;

&lt;p&gt;Light and dark themes check the palettes your application provides.&lt;/p&gt;

&lt;p&gt;Forced colors checks how the interface behaves with a palette chosen by the user.&lt;/p&gt;

&lt;p&gt;Before shipping an icon-based control, make sure its meaning, boundary, focus, and state remain available under that condition too.&lt;/p&gt;




&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@media/forced-colors" rel="noopener noreferrer"&gt;MDN: forced-colors&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://drafts.csswg.org/css-color-adjust-1/#forced-color-adjust-prop" rel="noopener noreferrer"&gt;CSS Color Adjustment: forced-color-adjust&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/Accessibility/PreserveParentColor/explainer.md" rel="noopener noreferrer"&gt;Microsoft Edge: preserve-parent-color explainer&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://melanie-richards.com/blog/currentcolor-svg-hcm/" rel="noopener noreferrer"&gt;Melanie Richards: CurrentColor SVG in forced colors modes&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/svgicons/same-svg-different-runtime-why-css-inline-svg-and-are-not-equivalent-551d"&gt;SVGicons: Same SVG, Different Runtime&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>accessibilty</category>
      <category>svg</category>
      <category>css</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Keep Dynamic Icon Groups from Breaking Your List Layout</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Wed, 21 Oct 2026 17:34:09 +0000</pubDate>
      <link>https://dev.to/svgicons/keep-dynamic-icon-groups-from-breaking-your-list-layout-fo2</link>
      <guid>https://dev.to/svgicons/keep-dynamic-icon-groups-from-breaking-your-list-layout-fo2</guid>
      <description>&lt;p&gt;A list looks tidy when every row starts with one icon. Then one item gets three icons, another gets five, and the labels stop lining up.&lt;/p&gt;

&lt;p&gt;The tempting fix is to adjust the gap. That works for one row and breaks another. The gap was consistent already; the space before it was changing.&lt;/p&gt;

&lt;p&gt;Give every row the same leading slot, then put a limit on what can occupy it. In this React example, that means a shared CSS Grid column, a bounded icon stack, and an explicit rule for overflow.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjnq93xdhweqtj6d4rkz1.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjnq93xdhweqtj6d4rkz1.gif" alt="Animated illustration of icon group alignment before and after using a fixed-width slot" width="760" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why the labels drift
&lt;/h2&gt;

&lt;p&gt;Suppose a row contains an icon group followed by its label:&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;li&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;"source-row"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;IconGroup&lt;/span&gt; &lt;span class="na"&gt;members&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;members&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&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;"row-content"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a content-sized group in a flex row, the label follows the group's width. One badge takes less space than three overlapping badges. Even with identical icon sizes and gaps, the labels start at different positions.&lt;/p&gt;

&lt;p&gt;That is reasonable flex behavior. It becomes a problem when the design expects a common label column across independent rows.&lt;/p&gt;

&lt;p&gt;A concrete instance appears in &lt;a href="https://github.com/yetone/magpie/issues/2498" rel="noopener noreferrer"&gt;Magpie issue #2498&lt;/a&gt;: model rows have a single provider icon, while routing groups have stacked icons. The issue describes reserving a common leading width. This tutorial uses that reported problem as a starting point, with an independent teaching implementation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Define the stack policy before choosing the width
&lt;/h2&gt;

&lt;p&gt;A fixed column alone does not stop its children from overflowing. Decide how many positions the component can display first.&lt;/p&gt;

&lt;p&gt;For this example:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Number of sources&lt;/th&gt;
&lt;th&gt;Visible content&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;Empty slot, with the label still aligned&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1–3&lt;/td&gt;
&lt;td&gt;All source icons&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4 or more&lt;/td&gt;
&lt;td&gt;First two icons and a counter for the remaining sources&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Five sources therefore render as two icons and &lt;code&gt;+3&lt;/code&gt;. The counter occupies the third position; it is not appended as a fourth item.&lt;/p&gt;

&lt;p&gt;Use 28px badges, with each overlapping badge starting 16px after the previous one. Three positions occupy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;28 + (3 - 1) × 16 = 60px
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A 64px slot leaves 4px of spare space. With a 16px root font size, those dimensions are &lt;code&gt;1.75rem&lt;/code&gt;, &lt;code&gt;1rem&lt;/code&gt;, and &lt;code&gt;4rem&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Choose a width from the actual badge geometry and overflow policy. A &lt;code&gt;3rem&lt;/code&gt; slot, for example, would be too small for this particular stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build the React component
&lt;/h2&gt;

&lt;p&gt;The example uses three Tabler SVGs retrieved through the SVGicons catalogue:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://svgicons.com/icon/205669/folder" rel="noopener noreferrer"&gt;Folder&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://svgicons.com/icon/203679/bell" rel="noopener noreferrer"&gt;Bell&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://svgicons.com/icon/205533/file-settings" rel="noopener noreferrer"&gt;File Settings&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;They are by Paweł Kuna and distributed under the &lt;a href="https://github.com/tabler/tabler-icons/blob/main/LICENSE" rel="noopener noreferrer"&gt;MIT licence&lt;/a&gt;. Keep the copyright and licence notice with redistributed assets.&lt;/p&gt;

&lt;p&gt;Save them in your application's public directory so they are available at &lt;code&gt;/icons/folder.svg&lt;/code&gt;, &lt;code&gt;/icons/bell.svg&lt;/code&gt;, and &lt;code&gt;/icons/file-settings.svg&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The layout does not require a particular icon library. Using local image files keeps SVG markup out of the component's layout logic.&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;IconGroup&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;members&lt;/span&gt; &lt;span class="p"&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;visible&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;members&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;members&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;slice&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;members&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;hidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;members&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nx"&gt;visible&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&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-slot"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&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-stack"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;visible&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;member&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt;&lt;span class="p"&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;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&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;"badge"&lt;/span&gt;
            &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;member&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;--index&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;index&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;&amp;gt;&lt;/span&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="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;member&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;src&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="na"&gt;alt&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt; &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"18"&lt;/span&gt; &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"18"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;

        &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&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;"badge count"&lt;/span&gt; &lt;span class="na"&gt;style&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;--index&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;hidden&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;99&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;99+&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`+&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;SourceList&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;items&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;ul&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;"source-list"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&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;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;li&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;"source-row"&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;IconGroup&lt;/span&gt; &lt;span class="na"&gt;members&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;members&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;

          &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&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;"row-content"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&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;"row-label"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&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;"sr-only"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
              &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;members&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;
                &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;`. Sources: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;item&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;members&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;m&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;, &lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
                &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;. No connected sources&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
            &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;span&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;li&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;))&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;ul&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;Each member needs a stable, unique &lt;code&gt;id&lt;/code&gt;, a readable &lt;code&gt;name&lt;/code&gt;, and a trusted local &lt;code&gt;src&lt;/code&gt;. For example:&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;files&lt;/span&gt;&lt;span class="dl"&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="s1"&gt;Files&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/icons/folder.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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;alerts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;alerts&lt;/span&gt;&lt;span class="dl"&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="s1"&gt;Alerts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/icons/bell.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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;config&lt;/span&gt;&lt;span class="dl"&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="s1"&gt;Configuration&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/icons/file-settings.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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;archive&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;archive&lt;/span&gt;&lt;span class="dl"&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="s1"&gt;Archive&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/icons/folder.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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;monitoring&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;monitoring&lt;/span&gt;&lt;span class="dl"&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="s1"&gt;Monitoring&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/icons/bell.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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;items&lt;/span&gt; &lt;span class="o"&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;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;documents&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Documents&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;members&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;files&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;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;activity&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Project activity&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;members&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;alerts&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;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;overview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Workspace overview&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;members&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;alerts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;config&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;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;operations&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Operations across all connected workspaces&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;members&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;alerts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;config&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;archive&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;monitoring&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;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;empty&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;No connected sources yet&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;members&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;App&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;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SourceList&lt;/span&gt; &lt;span class="na"&gt;items&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The source names are exposed once as text. The overlapping images and counter are hidden from assistive technology, avoiding a second announcement of the same source information.&lt;/p&gt;

&lt;p&gt;This approach suits a static list. If users need to inspect or select individual sources, provide a visible details view with equivalent keyboard access. A tiny overlapped badge should not be the only way to reach an action.&lt;/p&gt;

&lt;p&gt;Localize the source sentence and counter formatting for your product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reserve the column and contain the stack
&lt;/h2&gt;

&lt;p&gt;Apply these styles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;box-sizing&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;border-box&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.source-list&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--badge-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--stack-step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--icon-slot&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;4rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nl"&gt;list-style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.source-row&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;grid-template-columns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--icon-slot&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;minmax&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="n"&gt;fr&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;column-gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;align-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="py"&gt;padding-block&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;border-block-start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="m"&gt;#e3e8f1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.icon-slot&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;min-inline-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;inline-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--icon-slot&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.icon-stack&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;relative&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;block-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--badge-size&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.badge&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;inset-inline-start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="err"&gt;*&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--stack-step&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="py"&gt;inset-block-start&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="py"&gt;inline-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--badge-size&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="py"&gt;block-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;var&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;--badge-size&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;place-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#dce8ff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;2px&lt;/span&gt; &lt;span class="nb"&gt;solid&lt;/span&gt; &lt;span class="no"&gt;white&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.badge&lt;/span&gt;&lt;span class="nd"&gt;:nth-child&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;2&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#dcf5ec&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.badge&lt;/span&gt;&lt;span class="nd"&gt;:nth-child&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="err"&gt;3&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#efe3ff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.badge&lt;/span&gt; &lt;span class="nt"&gt;img&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;inline-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.125rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;block-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.125rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.count&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;font-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.625rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;800&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#17233b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.row-content&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;min-inline-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.row-label&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow-wrap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;anywhere&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.sr-only&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;absolute&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;inline-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;block-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-1px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;overflow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;hidden&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;clip-path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;50%&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nl"&gt;white-space&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;nowrap&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&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;/div&gt;



&lt;p&gt;There are two separate constraints here:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The shared &lt;code&gt;--icon-slot&lt;/code&gt; keeps the label position consistent across rows.&lt;/li&gt;
&lt;li&gt;The component's three-position limit keeps the stack within that slot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An empty group keeps its wrapper, so zero icons does not become another alignment exception.&lt;/p&gt;

&lt;p&gt;The absolutely positioned badges need an explicit stack height because they do not contribute to their parent's normal flow height. Later badges paint over earlier ones in this simple stack.&lt;/p&gt;

&lt;p&gt;The label track uses &lt;code&gt;minmax(0, 1fr)&lt;/code&gt; so its minimum track size does not default to a content-based minimum. &lt;code&gt;min-inline-size: 0&lt;/code&gt; lets the content wrapper shrink, while &lt;code&gt;overflow-wrap: anywhere&lt;/code&gt; allows long unbroken identifiers to wrap.&lt;/p&gt;

&lt;p&gt;These choices address different parts of overflow handling. Replacing the icon column alone will not fix every long-text case. See MDN's references for &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/grid-template-columns" rel="noopener noreferrer"&gt;grid track sizing&lt;/a&gt; and &lt;a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/min-width" rel="noopener noreferrer"&gt;minimum widths&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;If labels must stay on one line, use a deliberate truncation design instead. Make the full text available through an accessible details interaction; do not rely only on a mouse tooltip.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the same rule on narrow screens and in RTL
&lt;/h2&gt;

&lt;p&gt;As the container narrows, the fixed slot stays put and the text wraps in the remaining track. Top alignment keeps a multi-line label beside the top of its icon stack.&lt;/p&gt;

&lt;p&gt;If a compact design needs a smaller slot, change its geometry for the entire list. For example, 24px badges with a 12px step occupy 48px across three positions:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.source-list.compact&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="py"&gt;--badge-size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1.5rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--stack-step&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;.75rem&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="py"&gt;--icon-slot&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;3rem&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;/div&gt;



&lt;p&gt;Never make this choice independently for each row, or the common column disappears again. Check that the counter remains readable in the smaller badges.&lt;/p&gt;

&lt;p&gt;For right-to-left layout, place &lt;code&gt;dir="rtl"&lt;/code&gt; on the list or an ancestor. Grid's inline direction places the leading column on the right. &lt;code&gt;inset-inline-start&lt;/code&gt; moves the badge stack from that same side.&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;div&lt;/span&gt; &lt;span class="na"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"rtl"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SourceList&lt;/span&gt; &lt;span class="na"&gt;items&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;items&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use real translated labels when reviewing the result. Changing direction on English text checks the layout rule, but does not verify Arabic or Hebrew typography, punctuation, or mixed-direction identifiers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test the relationship that matters
&lt;/h2&gt;

&lt;p&gt;A screenshot can catch an obvious regression. A geometry assertion can also express the actual requirement: every label container has the same leading edge.&lt;/p&gt;

&lt;p&gt;Here is a Playwright test for a page containing one &lt;code&gt;.source-list&lt;/code&gt;. Serve the component on the &lt;code&gt;/&lt;/code&gt; route and configure Playwright's &lt;code&gt;baseURL&lt;/code&gt; to point to your development server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;expect&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="s1"&gt;@playwright/test&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;for &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;width&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;420&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1100&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;for &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;direction&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ltr&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rtl&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="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`label alignment: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;px &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;direction&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&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="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setViewportSize&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="nx"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;});&lt;/span&gt;

      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.source-list&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;list&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dir&lt;/span&gt;&lt;span class="p"&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="nx"&gt;list&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;dir&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;direction&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;edges&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;locator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;.row-content&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;evaluateAll&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dir&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;nodes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;rect&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;node&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getBoundingClientRect&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;dir&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rtl&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="nx"&gt;rect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;right&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;rect&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;left&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}),&lt;/span&gt;
        &lt;span class="nx"&gt;direction&lt;/span&gt;
      &lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;edges&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toBeGreaterThan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

      &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;max&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;edges&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;min&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nx"&gt;edges&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toBeLessThan&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&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;/div&gt;



&lt;p&gt;Also check that every badge stays within its slot, images have loaded, and the document has no horizontal overflow. A component can keep its labels aligned while its icons still collide with them.&lt;/p&gt;

&lt;p&gt;Use fixtures with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Zero, one, two, three and five sources.&lt;/li&gt;
&lt;li&gt;A very large source count.&lt;/li&gt;
&lt;li&gt;A multi-line label.&lt;/li&gt;
&lt;li&gt;A long unbroken identifier.&lt;/li&gt;
&lt;li&gt;Larger text.&lt;/li&gt;
&lt;li&gt;Both LTR and RTL directions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Check keyboard navigation if the rows contain links or buttons. Keep screenshot baselines only after reviewing the initial renders, and rerun the checks in your supported browser engines.&lt;/p&gt;

&lt;p&gt;The useful invariant is simple: source count may change the content of the icon slot, but it must not change where the label begins. Once that rule is explicit, new data has much less room to rearrange the list.&lt;/p&gt;

</description>
      <category>react</category>
      <category>css</category>
      <category>webdev</category>
      <category>frontend</category>
    </item>
    <item>
      <title>Your SVG Icon Migration Worked. So Why Are Some Icons Missing?</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Tue, 20 Oct 2026 14:52:16 +0000</pubDate>
      <link>https://dev.to/svgicons/your-svg-icon-migration-worked-so-why-are-some-icons-missing-1ok</link>
      <guid>https://dev.to/svgicons/your-svg-icon-migration-worked-so-why-are-some-icons-missing-1ok</guid>
      <description>&lt;p&gt;&lt;em&gt;Your SVG files are valid. Your toolbar icons look fine. But some dropdown menus are suddenly missing their icons. Here's why that happens—and how to catch it before release.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Migrating from CSS sprites to SVG icons sounds straightforward.&lt;/p&gt;

&lt;p&gt;You replace the old assets, update the components, check that the new icons render, and move on.&lt;/p&gt;

&lt;p&gt;Everything looks fine until someone opens a dropdown menu.&lt;/p&gt;

&lt;p&gt;The toolbar icons are there. The menu labels are visible. The actions still work. But the icons inside the menu have disappeared.&lt;/p&gt;

&lt;p&gt;The strange part? &lt;strong&gt;The missing icons may already exist in your SVG sprite.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This isn't necessarily an asset problem. It can be a migration problem: one part of your application uses the new rendering system while another still expects the old one.&lt;/p&gt;

&lt;p&gt;Let's look at a real-world example, reproduce the failure in React, and build a practical checklist for avoiding it.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. A real migration bug: the icons existed, but the menus were blank
&lt;/h2&gt;

&lt;p&gt;In August 2026, a contributor reported an issue in Euro-Office DocumentServer:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/Euro-Office/DocumentServer/issues/313" rel="noopener noreferrer"&gt;Dropdown menu items still render icons the old way — every menu icon is blank&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The application had been migrating from CSS/PNG sprites to SVG symbols.&lt;/p&gt;

&lt;p&gt;Its toolbar buttons had already moved to the new SVG rendering approach, but dropdown menu items still generated the old CSS sprite markup.&lt;/p&gt;

&lt;p&gt;The PNG sprite assets that those menus depended on were no longer being generated or shipped.&lt;/p&gt;

&lt;p&gt;The result was predictable once the cause was identified: buttons displayed their icons, while dropdown menus showed empty spaces.&lt;/p&gt;

&lt;p&gt;According to the issue report, 1,092 menu items declared icons across five editors. The report also found that the SVG symbols needed by the document editor's menus were largely already available.&lt;/p&gt;

&lt;p&gt;The issue was subsequently closed.&lt;/p&gt;

&lt;p&gt;What makes this case interesting isn't the missing artwork. It's the difference between migrating icon files and migrating the components that render them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A migration can be complete at the asset level and still be incomplete at the interface level.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Reproducing the problem in a React application
&lt;/h2&gt;

&lt;p&gt;To make the issue easier to understand, we built a small, independent React and TypeScript demonstration.&lt;/p&gt;

&lt;p&gt;It contains a document-style interface with toolbar buttons and a dropdown menu.&lt;/p&gt;

&lt;p&gt;The same actions—Copy, Paste, Save, and Download—appear in both places.&lt;/p&gt;

&lt;p&gt;In the incomplete migration, the toolbar uses SVG symbols correctly. The dropdown still uses legacy CSS sprite references.&lt;/p&gt;

&lt;p&gt;The result looks like this:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Before and after: the toolbar works in both versions, but the dropdown icons only appear after correcting the rendering code.&lt;/strong&gt;&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgo7w9h1rkd0gl1nuzdps.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgo7w9h1rkd0gl1nuzdps.png" alt="Before and after SVG migration: toolbar icons work in both versions, but dropdown icons are missing before the fix" width="800" height="457"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice that the menu items don't disappear. Their text and actions remain available.&lt;/p&gt;

&lt;p&gt;Only the icons are missing.&lt;/p&gt;

&lt;p&gt;This is why the problem can escape ordinary functional testing. A test that checks whether a menu opens or an action runs may still pass.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Why CSS sprites and SVG symbols aren't interchangeable
&lt;/h2&gt;

&lt;p&gt;Consider how an application might have rendered icons before the migration.&lt;/p&gt;

&lt;h3&gt;
  
  
  The old CSS sprite approach
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"legacy-icon legacy-copy"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/span&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.legacy-icon&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;inline-block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-image&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sx"&gt;url("/icons.png")&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background-repeat&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;no-repeat&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.legacy-copy&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;-40px&lt;/span&gt; &lt;span class="m"&gt;0&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;/div&gt;



&lt;p&gt;The icon depends on an external PNG image and CSS rules that select the correct position within that image.&lt;/p&gt;

&lt;p&gt;If the PNG sprite or its CSS rules are removed, the element can still exist in the DOM.&lt;/p&gt;

&lt;p&gt;But nothing draws the icon.&lt;/p&gt;

&lt;p&gt;That's an important distinction: the markup hasn't disappeared, and the browser doesn't necessarily report a JavaScript error.&lt;/p&gt;

&lt;h3&gt;
  
  
  The new SVG symbol approach
&lt;/h3&gt;

&lt;p&gt;An SVG sprite can define reusable symbols:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&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="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"position:absolute;width:0;height:0;overflow:hidden"&lt;/span&gt;
  &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;symbol&lt;/span&gt; &lt;span class="na"&gt;id=&lt;/span&gt;&lt;span class="s"&gt;"icon-copy"&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="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;rect&lt;/span&gt;
      &lt;span class="na"&gt;x=&lt;/span&gt;&lt;span class="s"&gt;"8"&lt;/span&gt; &lt;span class="na"&gt;y=&lt;/span&gt;&lt;span class="s"&gt;"8"&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"12"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"12"&lt;/span&gt;
      &lt;span class="na"&gt;rx=&lt;/span&gt;&lt;span class="s"&gt;"1"&lt;/span&gt;
      &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
      &lt;span class="na"&gt;stroke=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;
      &lt;span class="na"&gt;stroke-width=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;
    &lt;span class="nt"&gt;/&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;"M16 8V4H4v12h4"&lt;/span&gt;
      &lt;span class="na"&gt;fill=&lt;/span&gt;&lt;span class="s"&gt;"none"&lt;/span&gt;
      &lt;span class="na"&gt;stroke=&lt;/span&gt;&lt;span class="s"&gt;"currentColor"&lt;/span&gt;
      &lt;span class="na"&gt;stroke-width=&lt;/span&gt;&lt;span class="s"&gt;"2"&lt;/span&gt;
    &lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/symbol&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;p&gt;A component can reference that symbol with &lt;code&gt;&amp;lt;use&amp;gt;&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"icon"&lt;/span&gt; &lt;span class="na"&gt;aria-hidden=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#icon-copy"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&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;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.icon&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inherit&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;/div&gt;



&lt;p&gt;Here, the symbol is defined within the same document. An external SVG sprite can also be used, but the URL and symbol IDs must resolve correctly.&lt;/p&gt;

&lt;p&gt;The difference is fundamental.&lt;/p&gt;

&lt;p&gt;The CSS sprite approach relies on background images and positioning rules. The SVG symbol approach relies on valid symbol references and SVG rendering.&lt;/p&gt;

&lt;p&gt;Removing the old sprite files doesn't automatically update the components that reference them.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. What an incomplete migration looks like
&lt;/h2&gt;

&lt;p&gt;Here's the problem in our demonstration.&lt;/p&gt;

&lt;p&gt;The toolbar has been migrated:&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ToolbarButton&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;
        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt;
        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt;
        &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;use&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"#icon-copy"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      Copy
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;But the dropdown still renders a legacy element:&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;MenuAction&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;span&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;"legacy-icon legacy-copy"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      Copy
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;The toolbar doesn't need the old PNG sprites anymore.&lt;/p&gt;

&lt;p&gt;The menu still does.&lt;/p&gt;

&lt;p&gt;Once those assets and styles are removed, the menu icon becomes invisible.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3ssk3mq1mboshnresra6.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F3ssk3mq1mboshnresra6.png" alt="React application showing working toolbar icons and missing dropdown menu icons." width="800" height="729"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the screenshot, the toolbar icons are visible, but the dropdown entries have no icons.&lt;/p&gt;

&lt;p&gt;There's no need to invent a missing asset or artificially hide anything to reproduce the failure.&lt;/p&gt;

&lt;p&gt;The old markup simply no longer has a working rendering mechanism.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fixing the menu
&lt;/h3&gt;

&lt;p&gt;The immediate correction is to update the menu to reference the SVG symbol:&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="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;MenuAction&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;
        &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt;
        &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"20"&lt;/span&gt;
        &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
      &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;use&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"#icon-copy"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      Copy
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;The icon now renders through the same mechanism as the toolbar.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe7i1uka7dpzy9kz8xr8f.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe7i1uka7dpzy9kz8xr8f.png" alt="React application showing restored SVG icons in the dropdown menu after migration." width="800" height="729"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But manually fixing individual menus doesn't address the larger problem: how do you stop different components from implementing icon rendering differently?&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Use one icon component across your interface
&lt;/h2&gt;

&lt;p&gt;A shared icon component is one practical way to reduce inconsistencies.&lt;/p&gt;

&lt;p&gt;In React, a simple implementation might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;IconName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;copy&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;paste&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;save&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;download&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;IconProps&lt;/span&gt; &lt;span class="o"&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="nx"&gt;IconName&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;size&lt;/span&gt;&lt;span class="p"&gt;?:&lt;/span&gt; &lt;span class="kr"&gt;number&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;Icon&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;size&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;20&lt;/span&gt; &lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;IconProps&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;
      &lt;span class="na"&gt;width&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;height&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;size&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
      &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;
      &lt;span class="na"&gt;focusable&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt;
    &lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;use&lt;/span&gt; &lt;span class="na"&gt;href&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`#icon-&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;svg&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;Both the toolbar and the menu can now render the same symbol through the same component:&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;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;Icon&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"copy"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
  Copy
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This doesn't eliminate every possible icon bug.&lt;/p&gt;

&lt;p&gt;An incorrect symbol ID, a missing sprite, or incompatible styling can still cause problems.&lt;/p&gt;

&lt;p&gt;But it reduces the number of places where icon rendering behaviour must be maintained.&lt;/p&gt;

&lt;p&gt;For icon-only controls, remember that the button itself still needs an accessible name—for example, through &lt;code&gt;aria-label&lt;/code&gt;. The decorative SVG shouldn't be the only source of that name.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Finding legacy icon references before they reach production
&lt;/h2&gt;

&lt;p&gt;After updating your main components, search the codebase for references to the old rendering system.&lt;/p&gt;

&lt;p&gt;Don't limit the search to image files.&lt;/p&gt;

&lt;p&gt;Old rendering logic may still exist in templates, dropdown components, CSS classes, or conditional code paths.&lt;/p&gt;

&lt;p&gt;For example, with ripgrep:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rg &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s1"&gt;'background-image|background-position'&lt;/span&gt; src
rg &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s1"&gt;'legacy-icon|iconCls|menu-item-icon'&lt;/span&gt; src
rg &lt;span class="nt"&gt;-n&lt;/span&gt; &lt;span class="s1"&gt;'\.png'&lt;/span&gt; src
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These searches are intentionally broad.&lt;/p&gt;

&lt;p&gt;A match doesn't automatically indicate a migration bug. CSS backgrounds and PNG files may still be legitimate elsewhere in the application.&lt;/p&gt;

&lt;p&gt;The goal is to identify code that still renders icons using a mechanism scheduled for removal.&lt;/p&gt;

&lt;p&gt;A useful component inventory can help:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Component&lt;/th&gt;
&lt;th&gt;SVG migration&lt;/th&gt;
&lt;th&gt;Visual verification&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Toolbar buttons&lt;/td&gt;
&lt;td&gt;Complete&lt;/td&gt;
&lt;td&gt;Passed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dropdown menus&lt;/td&gt;
&lt;td&gt;Complete&lt;/td&gt;
&lt;td&gt;Passed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Context menus&lt;/td&gt;
&lt;td&gt;Needs review&lt;/td&gt;
&lt;td&gt;Pending&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Dialog buttons&lt;/td&gt;
&lt;td&gt;Complete&lt;/td&gt;
&lt;td&gt;Passed&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Selected states&lt;/td&gt;
&lt;td&gt;Needs review&lt;/td&gt;
&lt;td&gt;Pending&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Disabled states&lt;/td&gt;
&lt;td&gt;Needs review&lt;/td&gt;
&lt;td&gt;Pending&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The important thing is to inspect each type of component, not just the most visible one.&lt;/p&gt;

&lt;p&gt;Dropdowns and context menus are particularly easy to overlook because they aren't always visible during normal page loading.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Test what users actually see
&lt;/h2&gt;

&lt;p&gt;A successful build doesn't guarantee that icons are visible.&lt;/p&gt;

&lt;p&gt;Neither does checking that an SVG element exists in the DOM.&lt;/p&gt;

&lt;p&gt;For example, this markup is syntactically valid:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;svg&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;use&lt;/span&gt; &lt;span class="na"&gt;href=&lt;/span&gt;&lt;span class="s"&gt;"#icon-does-not-exist"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/use&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;p&gt;But if the referenced symbol doesn't exist, it won't display the intended icon.&lt;/p&gt;

&lt;p&gt;Likewise, a valid SVG reference can still produce an invisible icon because of color, sizing, clipping, or styling.&lt;/p&gt;

&lt;p&gt;That's why icon migrations benefit from multiple kinds of verification.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the SVG references
&lt;/h3&gt;

&lt;p&gt;Confirm that every symbol ID used by your components actually exists.&lt;/p&gt;

&lt;p&gt;Be especially careful when icons are assembled dynamically from names or application state.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check the rendered components
&lt;/h3&gt;

&lt;p&gt;Inspect the real interface, including menus that only appear after interaction.&lt;/p&gt;

&lt;p&gt;Verify that the expected SVG geometry is rendered, rather than checking only for the presence of an &lt;code&gt;&amp;lt;svg&amp;gt;&lt;/code&gt; tag.&lt;/p&gt;

&lt;h3&gt;
  
  
  Compare screenshots
&lt;/h3&gt;

&lt;p&gt;Capture representative interface states before and after the migration.&lt;/p&gt;

&lt;p&gt;For example, with Playwright:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;expect&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;@playwright/test&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nf"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;shows the migrated menu&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="p"&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="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;goto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;button&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;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;Actions&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="nf"&gt;click&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;menu&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getByRole&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;menu&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;menu&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toBeVisible&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

  &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;menu&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;toHaveScreenshot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;actions-menu.png&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This example assumes the application's Actions control opens a properly identified menu and that a reviewed baseline screenshot has already been created.&lt;/p&gt;

&lt;p&gt;Screenshot tests are particularly useful because they can reveal a missing icon even when the associated button or menu action continues to work.&lt;/p&gt;

&lt;p&gt;Our demonstration was checked using Chromium and Playwright, including tests that inspect rendered icon geometry and screenshots.&lt;/p&gt;

&lt;p&gt;That doesn't replace cross-browser testing in a production application, but it provides a useful starting point.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Don't forget themes and component states
&lt;/h2&gt;

&lt;p&gt;Migrating to SVG symbols also changes how icon styling is managed.&lt;/p&gt;

&lt;p&gt;For monochrome icons, &lt;code&gt;currentColor&lt;/code&gt; can simplify theme support by allowing the artwork to inherit the surrounding text color.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.action&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#27364b&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.action&lt;/span&gt; &lt;span class="nt"&gt;svg&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&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;/div&gt;



&lt;p&gt;If the referenced artwork uses &lt;code&gt;stroke="currentColor"&lt;/code&gt; or &lt;code&gt;fill="currentColor"&lt;/code&gt; appropriately, the icon can follow the component's color.&lt;/p&gt;

&lt;p&gt;Dark mode can then adjust that color through the surrounding component or theme.&lt;/p&gt;

&lt;p&gt;However, this only works when the SVG artwork and its styling are compatible with the chosen approach.&lt;/p&gt;

&lt;p&gt;During verification, check more than the default light theme.&lt;/p&gt;

&lt;p&gt;Include dark mode, hover, disabled, active, and selected states where relevant.&lt;/p&gt;

&lt;p&gt;Also test smaller icon sizes. An icon that looks correct at 32 pixels may be difficult to distinguish at 16 pixels.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Prevent the old rendering system from coming back
&lt;/h2&gt;

&lt;p&gt;Once the migration is complete, consider adding a lightweight automated check for obsolete markup.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;fs&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;node:fs&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;files&lt;/span&gt; &lt;span class="o"&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;src/components/Toolbar.tsx&lt;/span&gt;&lt;span class="dl"&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;src/components/Dropdown.tsx&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="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;failed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;for &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;file&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;files&lt;/span&gt;&lt;span class="p"&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;source&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;fs&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;readFileSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;utf8&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;source&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;legacy-icon&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="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="s2"&gt;`Legacy icon reference found in &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;file&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;
    &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;failed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="kc"&gt;true&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;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;failed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;exitCode&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&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;/div&gt;



&lt;p&gt;This intentionally simple example checks only the specified files.&lt;/p&gt;

&lt;p&gt;A production implementation should cover all relevant source directories and account for the project's template and component patterns.&lt;/p&gt;

&lt;p&gt;The purpose isn't to reject every use of CSS backgrounds.&lt;/p&gt;

&lt;p&gt;It's to prevent a retired icon-rendering mechanism from being reintroduced accidentally.&lt;/p&gt;

&lt;p&gt;Combine that source check with browser tests for components that use icons.&lt;/p&gt;

&lt;p&gt;The two approaches catch different classes of problems.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. A practical checklist for SVG icon migrations
&lt;/h2&gt;

&lt;p&gt;Before marking the migration complete, verify the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;[ ] Every icon-rendering component has been identified.&lt;/li&gt;
&lt;li&gt;[ ] Obsolete CSS sprite references have been reviewed.&lt;/li&gt;
&lt;li&gt;[ ] All required SVG symbol IDs exist.&lt;/li&gt;
&lt;li&gt;[ ] Toolbar, dropdown, and context menu icons render correctly.&lt;/li&gt;
&lt;li&gt;[ ] Light and dark themes have been checked.&lt;/li&gt;
&lt;li&gt;[ ] Disabled, selected, and hover states remain readable.&lt;/li&gt;
&lt;li&gt;[ ] Representative screenshots have been compared.&lt;/li&gt;
&lt;li&gt;[ ] Automated checks can detect deprecated icon markup.&lt;/li&gt;
&lt;li&gt;[ ] The migration has been tested beyond the main toolbar.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When choosing or replacing icons during this process, consistency matters too.&lt;/p&gt;

&lt;p&gt;Mixing unrelated icon families can introduce differences in stroke weight, proportions, and visual alignment—even when the migration itself works technically.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://svgicons.com" rel="noopener noreferrer"&gt;SVGicons.com&lt;/a&gt; can help developers explore and compare SVG icons when preparing a consistent set for an application.&lt;/p&gt;

&lt;p&gt;Asset selection and rendering verification are separate responsibilities, and both deserve attention.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;A missing icon doesn't always mean a missing file.&lt;/p&gt;

&lt;p&gt;Sometimes the artwork is available, the SVG sprite is valid, and most of the interface works perfectly.&lt;/p&gt;

&lt;p&gt;The problem is that one component still expects an icon-rendering system that no longer exists.&lt;/p&gt;

&lt;p&gt;That's why an icon migration shouldn't be considered complete until the actual interface has been verified.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Don't just check whether your SVG files migrated. Check whether every component migrated with them.&lt;/strong&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/Euro-Office/DocumentServer/issues/313" rel="noopener noreferrer"&gt;Euro-Office DocumentServer — Issue #313&lt;/a&gt; — real-world report of missing dropdown icons after an incomplete SVG sprite migration.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://svgicons.com" rel="noopener noreferrer"&gt;SVGicons.com&lt;/a&gt; — SVG icon discovery and selection.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;The React demonstration and screenshots described in this article are an independent educational reproduction, not screenshots from the Euro-Office application.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>svg</category>
      <category>react</category>
      <category>fronted</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Choose a Consistent SVG Icon Set for a React UI</title>
      <dc:creator>Svg/icons</dc:creator>
      <pubDate>Mon, 19 Oct 2026 22:24:39 +0000</pubDate>
      <link>https://dev.to/svgicons/how-to-choose-a-consistent-svg-icon-set-for-a-react-ui-5274</link>
      <guid>https://dev.to/svgicons/how-to-choose-a-consistent-svg-icon-set-for-a-react-ui-5274</guid>
      <description>&lt;p&gt;Finding an icon is usually straightforward. Finding six icons that look like they belong in the same interface takes a little more work.&lt;/p&gt;

&lt;p&gt;Consider a file manager built with React. You might need icons for folders, files, search, settings, and a few common actions.&lt;/p&gt;

&lt;p&gt;Each icon can look perfectly fine on its own. But put them next to each other and small differences start to appear: one has a heavier stroke, another uses different proportions, and a third looks noticeably smaller despite having the same CSS dimensions.&lt;/p&gt;

&lt;p&gt;The problem isn't necessarily the individual icons. It's the way they work together.&lt;/p&gt;

&lt;p&gt;Here's a practical approach to selecting a consistent set, using a React filebar as an example.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Start with the interface, not the icon library
&lt;/h2&gt;

&lt;p&gt;Before searching for icons, write down what the interface actually needs.&lt;/p&gt;

&lt;p&gt;For a file-management UI, that might include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A folder&lt;/li&gt;
&lt;li&gt;A document&lt;/li&gt;
&lt;li&gt;Search&lt;/li&gt;
&lt;li&gt;Settings&lt;/li&gt;
&lt;li&gt;Navigation actions&lt;/li&gt;
&lt;li&gt;File-related actions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This simple inventory makes the selection process easier.&lt;/p&gt;

&lt;p&gt;It also helps avoid a common problem: choosing attractive icons individually and then discovering that they don't form a coherent set.&lt;/p&gt;

&lt;p&gt;Think about where each icon will appear. A small toolbar button has different requirements from an illustration or a large empty-state graphic.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Choose a visual family
&lt;/h2&gt;

&lt;p&gt;The simplest way to maintain consistency is to start with one icon family.&lt;/p&gt;

&lt;p&gt;For our React filebar example, we used icons from Lucide.&lt;/p&gt;

&lt;p&gt;Using one family provides a useful baseline for stroke style, proportions and general visual language.&lt;/p&gt;

&lt;p&gt;That doesn't mean every icon automatically works well with every other icon. Some symbols have more visual weight because of their shape or complexity.&lt;/p&gt;

&lt;p&gt;A magnifying glass may look heavier than a simple arrow, even when both share the same stroke width.&lt;/p&gt;

&lt;p&gt;You still need to compare them at the size they'll actually use.&lt;/p&gt;

&lt;p&gt;A few things worth checking:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Stroke weight.&lt;/strong&gt; Do the outlines look equally heavy?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Proportions.&lt;/strong&gt; Do the symbols occupy a similar amount of visual space?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complexity.&lt;/strong&gt; Is one icon much more detailed than its neighbors?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recognition.&lt;/strong&gt; Can users understand the meaning without having to think about it?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Style.&lt;/strong&gt; Are you accidentally mixing filled, outlined and multicolor designs?&lt;/p&gt;

&lt;p&gt;The goal isn't mathematical uniformity. It's visual consistency.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Search within the same family
&lt;/h2&gt;

&lt;p&gt;Searching a large icon collection becomes more useful when you can narrow the results to a specific family.&lt;/p&gt;

&lt;p&gt;For our demonstration, we used the SVGicons CLI to explore public icon metadata.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;svgicons search &lt;span class="s2"&gt;"folder"&lt;/span&gt; &lt;span class="nt"&gt;--anonymous&lt;/span&gt; &lt;span class="nt"&gt;--icon-set&lt;/span&gt; lucide-svg-icons &lt;span class="nt"&gt;--limit&lt;/span&gt; 10 &lt;span class="nt"&gt;--json&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And another search:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;svgicons search &lt;span class="s2"&gt;"search"&lt;/span&gt; &lt;span class="nt"&gt;--anonymous&lt;/span&gt; &lt;span class="nt"&gt;--icon-set&lt;/span&gt; lucide-svg-icons &lt;span class="nt"&gt;--limit&lt;/span&gt; 10 &lt;span class="nt"&gt;--json&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;--icon-set&lt;/code&gt; option restricts the search to a particular collection.&lt;/p&gt;

&lt;p&gt;This helps when you want a consistent group rather than the most popular result from every available library.&lt;/p&gt;

&lt;p&gt;The JSON output also makes the results easier to inspect in a terminal workflow or an automated process.&lt;/p&gt;

&lt;p&gt;You can then compare candidates by name, collection and other available metadata.&lt;/p&gt;

&lt;p&gt;An important distinction: &lt;strong&gt;anonymous search returns metadata, not the raw SVG files&lt;/strong&gt;. Downloading SVG assets through the relevant SVGicons export workflows requires the appropriate Pro access.&lt;/p&gt;

&lt;p&gt;In our example, the React application used existing, locally adapted Lucide components. The CLI was used for discovery and comparison, not to claim a completed anonymous SVG export.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Don't assume the first result is the right one
&lt;/h2&gt;

&lt;p&gt;Icon search is useful, but rankings aren't a design decision.&lt;/p&gt;

&lt;p&gt;The first result may have the correct name while being visually unsuitable for your interface.&lt;/p&gt;

&lt;p&gt;For example, a search for "search" might return several variations of magnifying-glass icons, including symbols intended for different contexts.&lt;/p&gt;

&lt;p&gt;Inspecting additional results can help.&lt;/p&gt;

&lt;p&gt;With the SVGicons CLI, pagination is available using &lt;code&gt;--limit&lt;/code&gt; and &lt;code&gt;--offset&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;svgicons search &lt;span class="s2"&gt;"search"&lt;/span&gt; &lt;span class="nt"&gt;--anonymous&lt;/span&gt; &lt;span class="nt"&gt;--icon-set&lt;/span&gt; lucide-svg-icons &lt;span class="nt"&gt;--limit&lt;/span&gt; 10 &lt;span class="nt"&gt;--offset&lt;/span&gt; 10 &lt;span class="nt"&gt;--json&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This requests another page of results rather than relying only on the first ten matches.&lt;/p&gt;

&lt;p&gt;The exact ordering of search results can change, so avoid building your selection process around a fixed ranking.&lt;/p&gt;

&lt;p&gt;Once you have a candidate, verify that it communicates the action you intended.&lt;/p&gt;

&lt;p&gt;A visually consistent icon that suggests the wrong action is still a bad choice.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Compare icons together at their actual size
&lt;/h2&gt;

&lt;p&gt;This is where many icon-selection workflows fall short.&lt;/p&gt;

&lt;p&gt;An icon previewed individually at a large size may look completely different when placed inside a compact toolbar.&lt;/p&gt;

&lt;p&gt;Before making a final decision, put the icons next to one another.&lt;/p&gt;

&lt;p&gt;For a React interface, a small reusable component can help:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="nx"&gt;ToolbarButtonProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;label&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;children&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;ReactNode&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;ToolbarButton&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;children&lt;/span&gt; &lt;span class="p"&gt;}:&lt;/span&gt; &lt;span class="nx"&gt;ToolbarButtonProps&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="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;aria-label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;label&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&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;/div&gt;



&lt;p&gt;Then use your selected icon components within the same button structure.&lt;/p&gt;

&lt;p&gt;This makes it easier to compare the icons without differences in padding or button dimensions distracting you.&lt;/p&gt;

&lt;p&gt;Look at the toolbar as a whole.&lt;/p&gt;

&lt;p&gt;Does one symbol dominate? Does another almost disappear? Are some icons harder to distinguish at smaller sizes?&lt;/p&gt;

&lt;p&gt;You may need to choose a different symbol within the same family.&lt;/p&gt;

&lt;p&gt;That's usually preferable to mixing unrelated libraries just to find a shape you like.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Keep accessibility in the component contract
&lt;/h2&gt;

&lt;p&gt;Icon consistency isn't only visual.&lt;/p&gt;

&lt;p&gt;If an icon is the only content of a button, the button needs an accessible name.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight tsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"button"&lt;/span&gt; &lt;span class="na"&gt;aria-label&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Open settings"&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;SettingsIcon&lt;/span&gt; &lt;span class="na"&gt;aria-hidden&lt;/span&gt;&lt;span class="p"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt; &lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;span class="p"&gt;&amp;lt;/&lt;/span&gt;&lt;span class="nt"&gt;button&lt;/span&gt;&lt;span class="p"&gt;&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, the button communicates the action, while the SVG is decorative.&lt;/p&gt;

&lt;p&gt;This prevents the screen reader from having to interpret an unlabeled graphic.&lt;/p&gt;

&lt;p&gt;For icons that convey meaningful information independently, the accessibility approach may be different.&lt;/p&gt;

&lt;p&gt;The important point is to decide which element owns the accessible meaning instead of leaving it ambiguous.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Verify the finished React interface
&lt;/h2&gt;

&lt;p&gt;For our SVGicons demonstration, we used an existing React filebar built with six Lucide icons.&lt;/p&gt;

&lt;p&gt;The purpose wasn't to show that React could render SVG components. That's already well established.&lt;/p&gt;

&lt;p&gt;We wanted to see how a group of icons, selected with a consistent visual language, worked in a realistic interface.&lt;/p&gt;

&lt;p&gt;The workflow was:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Identify the icon needs of the filebar.&lt;/li&gt;
&lt;li&gt;Explore candidates using SVGicons CLI.&lt;/li&gt;
&lt;li&gt;Compare icons within the Lucide family.&lt;/li&gt;
&lt;li&gt;Review the existing licensed React components.&lt;/li&gt;
&lt;li&gt;Check how they look together in the real interface.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result is a practical example of why icon discovery and final UI review should be treated as connected steps.&lt;/p&gt;

&lt;p&gt;You can explore the React example here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/svgicons-com/svgicons-react-filebar" rel="noopener noreferrer"&gt;SVGicons React Filebar on GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository also includes the relevant licensing notices for the icon assets.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. A checklist before shipping
&lt;/h2&gt;

&lt;p&gt;Before committing your final icon choices, ask yourself:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do the icons communicate their intended actions?&lt;/li&gt;
&lt;li&gt;Do they belong to a consistent visual family?&lt;/li&gt;
&lt;li&gt;Are their proportions balanced at the intended size?&lt;/li&gt;
&lt;li&gt;Are they readable at small sizes?&lt;/li&gt;
&lt;li&gt;Are icon-only controls accessible?&lt;/li&gt;
&lt;li&gt;Are the icon licenses compatible with your project?&lt;/li&gt;
&lt;li&gt;Have you checked the actual application instead of relying only on individual previews?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You don't need an elaborate design-system review for every small interface.&lt;/p&gt;

&lt;p&gt;But even a few minutes spent comparing icons together can prevent a lot of inconsistent UI details.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;A large icon collection makes finding candidates easier. It doesn't automatically make choosing them easier.&lt;/p&gt;

&lt;p&gt;The useful workflow is to &lt;strong&gt;search, narrow down, compare, and verify in context&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For our React filebar, SVGicons CLI helped explore and compare icon metadata, while the existing Lucide components let us review the final result in a real interface.&lt;/p&gt;

&lt;p&gt;That separation matters: discovering an icon, obtaining its asset, and integrating it into an application are related steps, but they're not the same operation.&lt;/p&gt;

&lt;p&gt;A good icon set isn't just a collection of attractive symbols. It's a set of decisions that makes the interface feel coherent.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Resources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://svgicons.com" rel="noopener noreferrer"&gt;SVGicons&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/svgicons-com/cli" rel="noopener noreferrer"&gt;SVGicons CLI — GitHub&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/svgicons-com/svgicons-react-filebar" rel="noopener noreferrer"&gt;React Filebar Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lucide.dev" rel="noopener noreferrer"&gt;Lucide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>react</category>
      <category>svg</category>
      <category>frontend</category>
      <category>designsystem</category>
    </item>
  </channel>
</rss>
