Tag

Tags are used to filter displayed information. They can be combined and used in every colors of the ENGIE scheme.

Example

A tag component can be a div or a a element. Dont use button. You can add a close icon with nj-tag__icon class to trigger a JS event.

tag
tag
<div class="nj-tag nj-tag--blue-corporate"><span class="nj-tag__text">tag</span></div>
<a href="#" class="nj-tag nj-tag--violet"><span class="nj-tag__text">tag</span></a>

Filled variation

tag
tag
tag tag
<div class="nj-tag nj-tag--filled-blue-corporate"><span class="nj-tag__text">tag</span></div>
<div class="nj-tag nj-tag--filled-green-java"><span class="nj-tag__text">tag</span></div>
<a href="#" class="nj-tag nj-tag--filled-violet"><span class="nj-tag__text">tag</span></a>
<a href="#" class="nj-tag nj-tag--filled-orange"><span class="nj-tag__text">tag</span></a>

Color variation

Add any of the below mentioned modifier classes to change the appearance of a tag.

<a href="#" class="nj-tag nj-tag--white"><span class="nj-tag__text">white</span></a>
<a href="#" class="nj-tag nj-tag--blue-corporate"><span class="nj-tag__text">blue-corporate</span></a>
<a href="#" class="nj-tag nj-tag--blue-allports"><span class="nj-tag__text">blue-allports</span></a>
<a href="#" class="nj-tag nj-tag--blue-venice"><span class="nj-tag__text">blue-venice</span></a>
<a href="#" class="nj-tag nj-tag--green-java"><span class="nj-tag__text">green-java</span></a>
<a href="#" class="nj-tag nj-tag--green-pine"><span class="nj-tag__text">green-pine</span></a>
<a href="#" class="nj-tag nj-tag--green"><span class="nj-tag__text">green</span></a>
<a href="#" class="nj-tag nj-tag--orange"><span class="nj-tag__text">orange</span></a>
<a href="#" class="nj-tag nj-tag--red"><span class="nj-tag__text">red</span></a>
<a href="#" class="nj-tag nj-tag--blue-bigstone"><span class="nj-tag__text">blue-bigstone</span></a>
<a href="#" class="nj-tag nj-tag--blue-rhino"><span class="nj-tag__text">blue-rhino</span></a>
<a href="#" class="nj-tag nj-tag--green-fun"><span class="nj-tag__text">green-fun</span></a>
<a href="#" class="nj-tag nj-tag--green-riogrande"><span class="nj-tag__text">green-riogrande</span></a>
<a href="#" class="nj-tag nj-tag--yellow"><span class="nj-tag__text">yellow</span></a>
<a href="#" class="nj-tag nj-tag--purple"><span class="nj-tag__text">purple</span></a>
<a href="#" class="nj-tag nj-tag--violet"><span class="nj-tag__text">violet</span></a>
<a href="#" class="nj-tag nj-tag--violet-eggplant"><span class="nj-tag__text">violet-eggplant</span></a>
<a href="#" class="nj-tag nj-tag--cerise"><span class="nj-tag__text">cerise</span></a>

Conveying meaning to assistive technologies

Using color to add meaning only provides a visual indication, which will not be conveyed to users of assistive technologies – such as screen readers. Ensure that information denoted by the color is either obvious from the content itself (e.g. the visible text), or is included through alternative means, such as additional text hidden with the .sr-only class.

Deletable tags

This functionnality requires JavaScript instantiation if you use Tag component individually instead of fluid-design-system.{.js, .ts} full package.

bookmarksImport the entire source

import NJ from '@engie-group/fluid-design-system';

var njTags = NJ.Tag.init();

bookmark Import only the component

import Tag from '@engie-group/fluid-design-system/lib/components/tag';

var njTags = Tag.init();
Use only the tag <nj-tag></nj-tag> with the version 3.1 or higher and only in Angular, React or VueJs frameworks.
If you are using an older version or any JavaScript frameworks, do not use this tag and keep only the HTML inside.
<nj-tag><div class="nj-tag nj-tag--green"><span class="nj-tag__text">tag</span><i class="nj-tag__icon material-icons">close</i></div></nj-tag>
<nj-tag><a href="#" class="nj-tag nj-tag--red"><span class="nj-tag__text">tag</span><i class="nj-tag__icon material-icons">close</i></a></nj-tag>
<nj-tag><a href="#" class="nj-tag nj-tag--cerise"><span class="nj-tag__text">tag</span><i class="nj-tag__icon material-icons">close</i></a></nj-tag>
<nj-tag><a href="#" class="nj-tag nj-tag--filled-green-java"><span class="nj-tag__text">tag</span><i class="nj-tag__icon material-icons">close</i></a></nj-tag>
<nj-tag><a href="#" class="nj-tag nj-tag--filled-blue-corporate"><span class="nj-tag__text">tag</span><i class="nj-tag__icon material-icons">close</i></a></nj-tag>
<nj-tag><a href="#" class="nj-tag nj-tag--filled-orange"><span class="nj-tag__text">tag</span><i class="nj-tag__icon material-icons">close</i></a></nj-tag>

Disabled tags

tag
tagclose
<nj-tag><div class="nj-tag nj-tag--blue-corporate disabled"><span class="nj-tag__text">tag</span></div></nj-tag>
<nj-tag><a href="#" class="nj-tag nj-tag--cerise disabled"><span class="nj-tag__text">tag</span><i class="nj-tag__icon material-icons">close</i></a></nj-tag>