Security News
Input Validation Vulnerabilities Dominate MITRE's 2024 CWE Top 25 List
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
@shopify/polaris-icons
Advanced tools
This is a public package. Although it is possible to use it directly, we recommend using it through [Polaris React](https://github.com/Shopify/polaris-react). All of the icons in this package are also available in Polaris through the [Icon](https://polari
@shopify/polaris-icons is a package that provides a collection of icons used in Shopify's Polaris design system. These icons are designed to be used in Shopify applications to maintain a consistent look and feel.
Importing Icons
You can import individual icons from the @shopify/polaris-icons package. This allows you to use specific icons in your application without importing the entire icon set.
import { CirclePlusMajor } from '@shopify/polaris-icons';
Using Icons in Components
You can use the imported icons in your components by passing them as a source to the Icon component from the Polaris library.
import { Icon } from '@shopify/polaris';
import { CirclePlusMajor } from '@shopify/polaris-icons';
function MyComponent() {
return (
<Icon source={CirclePlusMajor} />
);
}
Customizing Icon Size and Color
You can customize the size and color of the icons by passing additional props to the Icon component.
import { Icon } from '@shopify/polaris';
import { CirclePlusMajor } from '@shopify/polaris-icons';
function MyComponent() {
return (
<Icon source={CirclePlusMajor} color="red" backdrop />
);
}
react-icons is a popular library that provides a wide range of icons from various icon libraries such as Font Awesome, Material Design, and more. It offers a more extensive collection of icons compared to @shopify/polaris-icons and is highly customizable.
fontawesome is a widely-used icon library that offers a vast collection of icons. It provides both free and premium icons and is highly customizable. Font Awesome icons can be used in various frameworks and libraries, making it a versatile choice.
@shopify/polaris-icons
This is a public package. Although it is possible to use it directly, we recommend using it through Polaris React. All of the icons in this package are also available in Polaris through the Icon component.
Make changes to this package to add, remove, or rename public icons.
Make sure your app is using @shopify/polaris
version 3.10.0
or higher.
We recommend the following usage:
icons/index.js
export {ExampleIcon} from '@shopify/polaris-icons';
other_page.js
import {Icon} from '@shopify/polaris';
import {ExampleIcon} from './icons';
<Icon source={ExampleIcon} />;
FAQs
[![npm version](https://img.shields.io/npm/v/@shopify/polaris-icons.svg?style=flat)](https://www.npmjs.com/package/@shopify/polaris-icons)
The npm package @shopify/polaris-icons receives a total of 111,639 weekly downloads. As such, @shopify/polaris-icons popularity was classified as popular.
We found that @shopify/polaris-icons demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 24 open source maintainers collaborating on the project.
Did you know?
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.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.