@massivebox/material-icons (1.33.0)

Published 2026-08-02 22:59:51 +00:00 by massivebox in massivebox/js-draw

Installation

@massivebox:registry=
npm install @massivebox/material-icons@1.33.0
"@massivebox/material-icons": "1.33.0"

About this package

@massivebox/material-icons

A material icon pack for js-draw.

The icons in this pack are licensed under the Apache 2.0 License. See the icon pack's GitHub repository.

Usage

With a bundler

If using a bundler (e.g. webpack), it should be possible to add @massivebox/material-icons as a dependency and import it directly.

For example,

import Editor from '@massivebox/js-draw';
import { MaterialIconProvider } from '@massivebox/material-icons';
import '@massivebox/js-draw/bundledStyles';

const editor = new Editor(document.body, {
  iconProvider: new MaterialIconProvider(),
});

// Add a toolbar that uses the icons
editor.addToolbar();

From a CDN

It's also possible to include js-draw and @massivebox/material-icons from a CDN.

For example, with JSDelivr,

<script src="https://cdn.jsdelivr.net/npm/js-draw@1.23.1/dist/bundle.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@massivebox/material-icons@1.23.1/dist/bundle.js"></script>

Then, in a script,

// makeMaterialIconProviderClass provides @massivebox/material-icons with an instance of the js-draw library.
const MaterialIcons = jsdrawMaterialIcons.makeMaterialIconProviderClass(jsdraw);

const editor = new jsdraw.Editor(document.body, {
  iconProvider: new MaterialIcons(),
});
editor.addToolbar();

Notes:

Dependencies

Development dependencies

ID Version
@massivebox/build-tool ^1.33.0
@massivebox/js-draw ^1.33.0

Peer dependencies

ID Version
@massivebox/js-draw ^1.0.1
Details
npm
2026-08-02 22:59:51 +00:00
6
Henry Heino
(MIT AND Apache-2.0)
158 KiB
Assets (1)
Versions (3) View all
1.34.1 2026-08-09
1.34.0 2026-08-03
1.33.0 2026-08-02