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

@equinor/eds-icons

Package Overview
Dependencies
Maintainers
3
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/eds-icons

Icons from the Equinor Design System

  • 0.6.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.8K
decreased by-55.31%
Maintainers
3
Weekly downloads
 
Created
Source

@equinor/eds-icons

This package is a collection of the system icons from the Equinor Design System as javascript objects.

Installation

npm install @equinor/eds-icons 

Usage

Import svg data:

import { save } from "@equinor/eds-icons"

React

We have developed a react component to simplify use of the EDS icons library within react.

import { Icon } from '@equinor/eds-core-react'
import { save } from '@equinor/eds-icons'

// Use library approach 
Icon.add({ save }) // (this needs only be done once)
<Icon name="save" />

// OR 

// Use directly via data prop:
<Icon data={save} />

FAQ

  • If you are using NodeJS 13+ for module loading, it now has native ES modules support. Add "type":"module" to your apps package.json to enable this.

  • If you get a syntax error trying to import ES module, try importing the CJS module as not all loaders have support for ES modules yet

Rendering icons

You can render it using plain svg or use our provided React Icon component in @equinor/eds-core-react

⚠️ Due to how Figma parses and exports svg icons the following attributes must be added to your <path></path> element; fill-rule="evenodd" clip-rule="evenodd"

Use EDS Assets in Figma(Equinor Figma account needed🔒) or storefront for icon names. Spaces in icon names are replaced with underscores.

star-filled -> star_filled.

Example of javascript object data

{
  name: 'star_filled',
  prefix: 'eds',
  height: '24',
  width: '24',
  svgPathData: 'M12 16.067l4.947 3.6-1.894-5.814L20 10.334h-6.067l-1.933-6-1.933 6H4l4.947 3.52-1.894 5.814 4.947-3.6z',
}

Credits

The EDS system icons are built on a copy of the Outlined Material Design icons provided open-source by Google. The icons have been customised and renamed for Equinor’s use.

Keywords

FAQs

Package last updated on 11 Dec 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