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

@mdi/js

Package Overview
Dependencies
Maintainers
6
Versions
50
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mdi/js

Dist for Material Design Icons for JS/TypeScript

  • 6.5.95
  • Source
  • npm
  • Socket score

Version published
Maintainers
6
Created

What is @mdi/js?

@mdi/js is a package that provides Material Design Icons as JavaScript constants. It allows developers to easily integrate Material Design Icons into their web applications by using SVG paths.

What are @mdi/js's main functionalities?

Importing Icons

You can import individual icons from the @mdi/js package. This allows you to use specific icons in your application without importing the entire library.

const { mdiAccount } = require('@mdi/js');

Using Icons in SVG

You can use the imported icon paths in your SVG elements. This allows you to render the icons directly in your HTML.

<svg viewBox="0 0 24 24"><path d="M12,2A10,10 0 1,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 1,1 4,12A8,8 0 0,1 12,4M12,6A6,6 0 1,0 18,12A6,6 0 0,0 12,6Z" /></svg>

Dynamic Icon Rendering

You can dynamically render icons by using the icon paths in your JavaScript code. This is useful for applications that need to render different icons based on user interactions or data.

const iconPath = require('@mdi/js').mdiAccount;
const svgElement = `<svg viewBox="0 0 24 24"><path d="${iconPath}" /></svg>`;

Other packages similar to @mdi/js

Keywords

FAQs

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

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