mdi-es6
material-design-icons as an es6 module with named exports for each icon as a string of svg markup.
mdi-es6
is also compatible with CommonJS, but bear in mind, CommonJS lacks tree shaking.
// const { cake, addAPhoto, usb, usb_18, usb_24, usb_48 } = require('mdi-es6') const range = documentconst cakeSvgNode = rangedocumentbody
Icon names are camelCased and each size is appended to the name, separated by an underscore. ${camelCasedName}_${size}
The default size, 24
, is also exported without the size in the name for convenience. SVG is vector and therefore infinitely scalable, so the default size should be suitable for most cases. You can scale the SVG up in size by adjusting (or removing) the height and width attributes on the SVG element.
View and search through the icons here.