FANDOM


WDSIcons is a small script aimed at making it easier for other script authors to use Design System icons in their scripts.

Usage

You can append an icon directly:

require(['fosl.wds'], function (wds) {
    $('.foo').append(wds.icon('pencil'));
});

and configure custom CSS classes and icon size too:

require(['fosl.wds'], function (wds) {
    $('.foo').append(wds.icon('trash', ['garbage'], 16));
});

Or you can have it operate on an existing section of HTML:

require(['fosl.wds'], function (wds) {
    $('.foo').html('<div class="custom-html">...<svg class="wds-icon not-loaded" data-name="pencil" viewBox="0 0 24 24"></svg></div>');
    wds.render('.foo');
});

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.