Launch Week Day 1: Socket for Jira Is Now Available.Learn More
Socket
Book a DemoSign in
Socket

@scania/icons

Package Overview
Dependencies
Maintainers
4
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@scania/icons

Scania icons package

latest
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
222
Maintainers
4
Weekly downloads
 
Created
Source

Scania Icons package

There are 2 options to use icons package. You can use it as a module or as a webfont.

1. Use as a module with sdds-icon component

This is a good option if your application supports script bundling, and for example you need all resources to be offline or hosted in your own server. To install icons package as a module, install using npm.

npm i @scania/icons --save

The icons can be used with component from @scania/components. Make sure you have installed @scania/components in your application. The benefits of this method is that it will be dynamically loaded. This solution will enable module bundling tools such as webpack to do dynamic referencing only to the icons used in the application.

<sdds-icon name="scania-truck"></sdds-icon>

2. Webfont

All icons are available as font icons. Import the font CSS from Scania CDN in your CSS or HTML.

// in CSS
@import url('https://cdn.digitaldesign.scania.com/icons/dist/1.0.0/fonts/css/sdds-icons.css');

Or you can add it in the HTML inside <head>.

<head>
    <link rel="stylesheet" href="https://cdn.digitaldesign.scania.com/icons/dist/1.0.0/fonts/css/sdds-icons.css">
</head>

Then, you can use it as a class in your element. Do not forget to add 'sdds-icon' class befor the icon name.

<i class="sdds-icon scania-arrow"></i>

Scania icons webfont is also available in the distribution of @scania/icons package. If you do not want to connect to Scania Digital Design CDN, or, you want to go fully offline, you can use this solution. To be able to use it, you can refer to the CSS which is available under node_modules/@scania/icons

<head>
    <link rel="stylesheet" href="node_modules/@scania/icons/dist/fonts/css/sdds-icons.css">
</head>

FAQs

Package last updated on 03 Nov 2021

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