npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@element-public/react-icon

v5.68.10-alpha.1

Published

Icon component for Element React

Downloads

578

Readme

Icon

Description

Icons are small representative images that can be combined with other components such as buttons.

See live demos on storybook

Storybook Icon Demos

Install from Artifactory

  • Verify that you have access to (https://docs.int.bayer.com/cloud/devops/artifactory/)[Bayer Artifactory]
    • Verify your token is correctly set up in your .npmrc as per the link above
  • Verify you have the @element scope configured in your .npmrc
    • @element:registry=https://artifactory.bayer.com/artifactory/api/npm/npm-platforms-engineering/
  • Install the component and themes bundles
    • npm i @element/react-components @element/themes
      • alternatively install the component individually along with the themes bundle npm i @element/react-icon @element/themes

Notes

The Icon component is intend for use with Material Icons and optionally Material Symbols. Please make sure that the correct stylesheet is included on your website (most commonly index.html).

Material Icons (classic):

<link
    href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500,700|Roboto+Mono:400,500|Material+Icons"
    rel="stylesheet"
/>

Please note that these imported stylesheets include all style variations, you probably just want to pick the one style your app is using (filled, outlined, rounded, two-tone or sharp)

Material Symbols (newer):

<link
    rel="stylesheet"
    href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200&family=Material+Symbols+Sharp:opsz,wght,FILL,[email protected],100..700,0..1,-50..200&family=Material+Symbols+Rounded:opsz,wght,FILL,[email protected],100..700,0..1,-50..200"
/>

Please note that these imported stylesheets include all style variations, you probably just want to pick the one style your app is using (outlined, rounded or sharp)

If using Material Symbols, you must set the iconSource='material-symbols' prop on each Icon.

Find more information at the following link:

  • https://fonts.google.com/icons?selected=Material+Icons

Icons can be used in several different sizes:

  • xsmall
  • small
  • medium
  • large
  • xlarge

Icons also support a number of color options:

  • filled-danger-alt
  • filled-danger
  • filled-muted
  • filled-primary
  • filled-secondary
  • color-primary
  • color-secondary
  • color-on-dark
  • blue
  • gray
  • green
  • orange
  • purple
  • red
  • teal
  • yellow

Alternatively, custom Icons can be used alone or with other components, similarly to the preexisting options.

Usage

Icons can be used with, or inside of, many other components, such as Badge and Button. Examples and demos of this behavior can be found under components' respective Storybook stories.

Accessibility Considerations

When creating a custom Icon, it is essential to ensure that the image is AA compliant. Refer to the following link, or one of many similar online resources, to check contrasting colors.

  • https://webaim.org/resources/contrastchecker/

Icon Props

| Name | Type | Default | Required | Description | | -------------- | ----------------------- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ariaHidden | boolean | null | false | Sets the aria-hidden attribute for the icon. If set to true, the icon will not be read by screen readers. Should be used if icon is purely decorative (such as when used in a button or textfield) or labeled by rendered text using aria-labelledBy or aria-label. | | ariaLabel | string | null | false | Accessibility label for assistive technologies. | | ariaLabelledBy | string | null | false | Id of the component being labeled for assistive technologies. | | badgePlacement | string | 'right-start' | false | The placement of the notification badge on the icon to start. It will flip to the opposite side if there is no room.Accepted Values: right-start, left-start | | className | string | undefined | false | The css class name to be passed through to the component markup. | | icon | string|React.ReactNode | null | false | Mostly commonly a string but accepts any valid markup or components. If a custom icon is used styles like color and size will need be handled with custom CSS. | | iconSize | string | 'medium' | false | One of 'xsmall', 'small', 'medium', 'large', and 'xlarge' will change the size of the icon. Defaults to medium.Accepted Values: xsmall, small, medium, large, xlarge | | iconSource | string | 'material-icons' | false | Choose between the classic Material Icons (default), newer Material Symbols, or custom.Accepted Values: material-icons, material-symbols | | iconType | string | 'filled' | false | The material icon type/style to be use. NOTE: Not all icons have every type and material-symbols only support outlined, rounded, and sharp. To see which icons are available for different types see Material Icons docsAccepted Values: filled, outlined, rounded, two-tone, sharp | | pointer | boolean | false | false | Add pointer icon style | | variant | string | empty string | false | Color variations. Variants prefixed with filled- will add a background color to the icon according to the theme. Variants prefixed with color- will change the color of the icon according to the theme.Accepted Values: filled-danger-alt, filled-danger, filled-primary, filled-secondary, color-primary, color-secondary, color-on-dark, color-on-unknown-black, secondary-on-surface, blue, gray, green, orange, purple, red, teal, yellowDeprecated Values: primary-alt, secondary-alt, primary, danger-alt, danger, muted |

Icon Deprecated Props

| Name | Type | Default | Required | Deprecated | Description | | ---- | ------ | --------- | -------- | ------------------------------ | --------------------------------------------------------------------------------------------------------------- | | size | string | undefined | false | Renamed, see iconSize instead. | One of 'xsmall', 'small', 'medium', 'large', and 'xlarge' will change the size of the icon. Defaults to medium. |

Icon Render Props

| Name | Type | Default | Required | Description | | ----- | --------------- | --------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- | | badge | React.ReactNode | undefined | false | The custom icon notification badge to be rendered. The icon notification badge component prevents xsmall and small icon size |