1.1.3 • Published 8 years ago

vui-icons v1.1.3

Weekly downloads
5
License
Apache-2.0
Repository
github
Last release
8 years ago

vui-icons

Bower version NPM version Build status Dependency Status

This component contains Sass mixins and CSS that can be used to incorporate icons into your application.

For further information on this and other VUI components, see the docs at ui.valence.d2l.com.

Installation

vui-icons can be installed from Bower:

bower install vui-icons

Or alternatively from NPM:

npm install vui-icons

Depending on which installation method you choose, use that path when doing the SASS import:

@import "bower_components/vui-icons/icons.scss";
// or...
@import "node_modules/vui-icons/icons.scss";

Usage

There are several ways to consume the icon images. The one you choose depends on your use case.

As a background image with text

In cases where the icon is purely decorative (it doesn't provide any additional information) and is accompanied by text, applying the icon using a background image is a good approach. It hides the icon from assistive technology (like a screen reader), allowing the text to stand alone.

Examples of this might include a button or link which contain text and the icon is redundant:

<button>
	<span class="vui-icon-bookmark" />
	Bookmark
</button>
<a>
	<span class="vui-icon-print" />
	Print
</a>

To make these CSS classes available, make sure you bundle the icons.css file (from the Bower/NPM package) with your application's CSS. The full list of available vui-icon-* class names is listed below.

As a background image with off-screen text

If you would prefer the text accompanying the icon to be invisible, the background image approach can be combined with off-screen text. The text will be positioned outside of the visible screen area using CSS, essentially hiding it for everyone except those using assistive devices.

To position something off-screen, you can either use the vui-offscreen component, or follow WebAIM's text-indent technique.

For example, a button or link which contains only an icon:

<button title="Bookmark">
	<span class="vui-icon-bookmark" />
	<span class="vui-offscreen">Bookmark</span>
</button>
<a title="Print">
	<span class="vui-icon-print" />
	<span class="vui-offscreen">Print</span>
</a>

We've used the title attribute in this example so that tooltips will appear on-hover.

Directly as an image element

Another way to consume the icons is by simply pointing a HTML <img> element's src attribute directly at the icon file. In both the Bower and NPM packages, all the icon files can be found in the images directory.

HTML:

<img src="/images/actions/subscribe.svg" alt="subscribed" />

Don't forget to provide alternate text if the icon isn't accompanied by any other text.

Available Icons

NameIconCSS ClassFilename
Bookmarknpm.iovui-icon-bookmark/images/actions/bookmark.png
Browsenpm.iovui-icon-browse/images/actions/browse.png
Copynpm.iovui-icon-copy/images/actions/copy.png
Createnpm.iovui-icon-create/images/actions/create.png
Deletenpm.iovui-icon-delete/images/actions/delete.png
Downloadnpm.iovui-icon-download/images/actions/download.png
Edit (Bulk)npm.iovui-icon-edit-bulk./images/actions/edit-bulk..png
Editnpm.iovui-icon-edit/images/actions/edit.png
Helpnpm.iovui-icon-help/images/actions/help.svg
Linknpm.iovui-icon-link/images/actions/link.png
Previewnpm.iovui-icon-preview/images/actions/preview.png
Printnpm.iovui-icon-print/images/actions/print.svg
Removenpm.iovui-icon-remove/images/actions/remove.png
Reordernpm.iovui-icon-reorder/images/actions/reorder.png
Searchnpm.iovui-icon-search/images/actions/search.png
Sharenpm.iovui-icon-share/images/actions/share.png
Slidersnpm.iovui-icon-sliders/images/actions/sliders.svg
Subscribenpm.iovui-icon-subscribe/images/actions/subscribe.svg
Tagnpm.iovui-icon-tag/images/actions/tag.png
Uploadnpm.iovui-icon-upload/images/actions/upload.png

Coding styles

See the VUI Best Practices & Style Guide for information on VUI naming conventions, plus information about the EditorConfig rules used in this repo.

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago

0.8.0

8 years ago

0.7.0

8 years ago

0.5.0

9 years ago

0.4.1

9 years ago

0.4.0

9 years ago

0.3.5

9 years ago

0.3.4

9 years ago

0.3.3

9 years ago

0.3.2

9 years ago

0.3.1

9 years ago

0.3.0

9 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago