🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

@apify/icons

Package Overview
Dependencies
Maintainers
10
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apify/icons

Icons as React components

beta
latest
npmnpm
Version
0.43.2
Version published
Maintainers
10
Created
Source

Apify shared icons

We use SVGR to convert .svg files into React components (.jsx).

The size should be defined in the icon so we don't break anything on frontend. We should only have size 16 and 20 icons (with some exceptions) and this should be set in the name (so the export can auto-generate it): e.g. circle_20.svg.

How to add icons

1. Add the SVG file to the ./icons_svg folder. Make sure the name includes the icon's size and matches the id in the SVG code. If the SVG contains something like the code below, please delete it.

<defs>
<clipPath id="clip0_2206_16395">
<rect width="16" height="16" fill="white"/>
</clipPath>
</defs>

2. BUILD THE PACKAGE

Since we don't add packages that often, this step should be manual. If you don't build 'em you can't use 'em.

So, what you need to do is:

npm run convert-icons

This will generate the JSX components in the ./svgr_output folder and auto-add them to the index so they can be exported. SVGR automatically replaces the fill values to currentColor, which will allow us to set the icon's color. It also adds the title prop, which is good for accessibility.

Compiler

To enable tree shaking without breaking the directory into folders, we are using tsup. Until we get rid of Node 14, we're stuck with v6.6.3.

On tsup update

It looks like first icon alphabetically is not being exported to index.d.ts file. To fix that, we added first (zeroth?) placeholder icon aaa_ts_placeholder.svg - if they fix it, we can remove it.

FAQs

Package last updated on 14 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts