Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@patternfly/pfe-icon

Package Overview
Dependencies
Maintainers
11
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@patternfly/pfe-icon

Icon element for PatternFly Elements

  • 1.0.0-prerelease.38
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
922
Maintainers
11
Weekly downloads
 
Created
Source

PFElements Icon Element

Usage

<pfe-icon icon="rh-leaf"></pfe-card>

Slots

There are no slots, but if you wish to display some text when JS is disabled, you can put some text inside the pfe-icon tag. For instance, when using a checkmark icon in a server status table, you may wish to display "success" if JS is disabled.

<pfe-icon icon="rh-check-mark">success</pfe-card>

Attributes

NameValuesDescription
iconiconSet-iconNameFor example, rh-leaf loads a leaf icon from an icon set named "rh".
sizesm md lg xl 2x 3x 4xThe default size is 1em, so icon size matches text size. 2x, etc, are multiples of font size. sm, md, etc are fixed pixel-based sizes.
colorbase complement accent critical important moderate success info defaultThe color variant to use. This draws from your theming layer to color the icon. This will set icon color and also background color (if circled).
circledboolean attributeWhether to draw a circular background behind the icon.

Icon sets

Icon sets are defined in detail in this blog post. The blog post should eventually be absorbed into the official documentation.

Variables

There are several powerful variables available to hook into and override default styles.

  • Color: the color attribute is available to pull icon color from your theming layer. For more fine-grained control, --pfe-icon--Color is available to override the color of a specific icon or sets of icons. Examples
  • Background color: the color attribute is available to pull background color from your theming layer. For more fine-grained control, --pfe-icon--BackgroundColor is available to override the background color of a specific icon or sets of icons.

Test

npm test

Build

npm run build

Demo

From the PFElements root directory, run:

npm start

Code style

Card (and all PFElements) use Prettier to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can integrate your editor with Prettier to have the style rules applied on every save.

Keywords

FAQs

Package last updated on 03 Feb 2020

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc