DEV Community

Deni Sugiarto
Deni Sugiarto

Posted on • Edited on

Struggling with Brand Icons in Web Development? Try Simple Icons!

Choosing a useful library can be tricky during web development because each library has its pros and cons. Today, I want to share the icon libraries I frequently use. For standard icons like mail and phone, I prefer Lucide Icons. Lucide Icons offers a wide range of high-quality, customizable icons that are perfect for everyday use in web applications. They are lightweight and easy to implement, making them a great choice for developers who need a reliable set of standard icons.

However, when it comes to brand icons, Lucide Icons doesn’t always have what I need. After some research, I discovered Simple Icons. You can check out this library at Simple Icons. Since I use React, I integrated their package library. Simple Icons offers “3150 Free SVG icons for popular brands,” which is amazing. After incorporating it into my projects, it perfectly addressed my need for standard brand icons.

Here’s a quick example of how to use Simple Icons in a React project:

First, install the necessary package:

// with yarn
yarn add @icons-pack/react-simple-icons

// with npm
npm add @icons-pack/react-simple-icons

// with pnpm
pnpm add @icons-pack/react-simple-icons

// with bun
bun add @icons-pack/react-simple-icons
Enter fullscreen mode Exit fullscreen mode

Then, you can use the icons in your React components like this:

import { SiReact } from '@icons-pack/react-simple-icons';

function BasicExample() {
  return <SiReact color='#61DAFB' size={24} />;
}
Enter fullscreen mode Exit fullscreen mode

In this example, we import icons for React, Next.js, JavaScript, and TypeScript from the react-icons package, which includes icons from Simple Icons. We then use these icons in a simple React component.

react #simpleicons #Nextjs #WebDevelopment #javascript #typescript

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.