<?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>Forem: Grace Chiamaka</title>
    <description>The latest articles on Forem by Grace Chiamaka (@gracie).</description>
    <link>https://forem.com/gracie</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F46086%2F38724f59-642d-4ac9-9142-c359cc7865c5.png</url>
      <title>Forem: Grace Chiamaka</title>
      <link>https://forem.com/gracie</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gracie"/>
    <language>en</language>
    <item>
      <title>How to use Ant Design’s Icons in Your React Application</title>
      <dc:creator>Grace Chiamaka</dc:creator>
      <pubDate>Tue, 24 Mar 2020 11:15:33 +0000</pubDate>
      <link>https://forem.com/gracie/how-to-use-ant-design-s-icons-in-your-react-application-18d</link>
      <guid>https://forem.com/gracie/how-to-use-ant-design-s-icons-in-your-react-application-18d</guid>
      <description>&lt;p&gt;Ant Design is an amazing React UI library of flexible high-quality reusable components. However, if you’re not familiar with the library trying to use the icons in a react application can take you a minute or two to figure out.&lt;/p&gt;

&lt;p&gt;So here’s what I figured out.&lt;/p&gt;

&lt;p&gt;To include ant’s design Icon’s in your application, first, you need to have installed the library using &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             `npm install antd` or `yarn add antd`
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once you’ve installed the library, you also need to install this &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;               `npm install @ant-design/icons`
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Once this is installed successfully, you’ll have access to the library icons&lt;/p&gt;

&lt;p&gt;On the library documentation, you can find the list of applications available to you here. You can find icons in three categories, outlined, filled and two-toned.&lt;br&gt;
You select an Icon you wish to use copy and include it in your code but you need to also import the icons into code where you want to use it.&lt;br&gt;
you can import the code by using this &lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   `import { CaretDownFilled } from '@ant-design/icons'` 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;you can now use this icon as a component changing the colour as you wish or two colours if you chose a two-toned icon, e.t.c.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vzrc4jQv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lixtf7o8tqwz0tukq5y8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vzrc4jQv--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lixtf7o8tqwz0tukq5y8.png" alt="Sample code snippet using an icon component"&gt;&lt;/a&gt;&lt;br&gt;
&lt;em&gt;Here's an example of how I used the caret-down icon&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The library's documentation provides information on properties that you can use with the icons and is easy to read and understand. Hope you found this article useful. Leave a comment if you wish to. Cheers!!!&lt;/p&gt;

</description>
      <category>antd</category>
      <category>antdicon</category>
      <category>antdesignicon</category>
      <category>react</category>
    </item>
  </channel>
</rss>
