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

@forter/icon

Package Overview
Dependencies
Maintainers
3
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forter/icon

Icon Component from Forter Components

  • 4.0.3
  • npm
  • Socket score

Version published
Weekly downloads
20
decreased by-87.34%
Maintainers
3
Weekly downloads
 
Created
Source

fc-icon

Icon element with global icon cache.

Usage

<script>
   import '@forter/icon';
</script>

<fc-icon icon="ecommerce"></fc-icon>

Example

Create blue icon and red on hover.

.custom-icon {
    --fc-icon-fill: blue;
    --fc-icon-fill-hover: red;
}

Examples

<!-- icons -->
<fc-icon icon="ecommerce" size="40" style="--fc-icon-fill-hover:gold;" hoverable></fc-icon>
<fc-icon icon="loyalty" size="40" style="--fc-icon-fill-hover:gold;" hoverable></fc-icon>
<fc-icon icon="returns" size="40" style="--fc-icon-fill-hover:gold;" hoverable></fc-icon>
<fc-icon icon="inr"  size="40" style="--fc-icon-fill-hover:gold;" hoverable></fc-icon>
<fc-icon icon="promotions"  size="40" style="--fc-icon-fill-hover:gold;" hoverable></fc-icon>
<fc-icon icon="gateway"  size="40" style="--fc-icon-fill-hover:gold;" hoverable></fc-icon>
<fc-icon icon="developer" size="40" style="--fc-icon-fill-hover:gold;" hoverable></fc-icon>

<!-- sizeOnly -->
<fc-icon size="60" icon="ecommerce"></fc-icon>

Properties

PropertyAttributeTypeDefaultDescription
cacheMap<any, any>Reference to the icon cache. This globally shared reference stores icons for all instance.
fallbackIconfallback-iconstring"FC_ICON_DEFAULT"The fallback icon key for the instance
hoverablehoverablebooleanfalseWhether the icon will change colour when hovered.
iconiconstring""The icon key. Used to lookup icon in the cache. Falls back to 'forter' whenever an icon is not found. example: returns
originalFilloriginal-fillbooleanfalseWhether to use the icon's original 'fill' SVG property. Needed for multicolor icons or for certain types of SVG.
sizesizenumber20Icon size, in pixels. Numerical values will be converted to strings e.g. 20 -> '40px', example: 80px.

CSS Custom Properties

PropertyDescription
--fc-icon-fillicon's svg fill. default: currentColor
--fc-icon-fill-hovericon's svg fill on hover. default: var(--cyan-5)
--fc-icon-sizeicon's size. default: 20px, example: 80px

Keywords

FAQs

Package last updated on 12 Dec 2019

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