Tags provide contextualizing information, such as filtering criteria or object metadata.
Use to display information that clarifies the content on the page, such as object metadata.
<div class="mds-tag"> Shared </div>
Use to enable the tag text to navigate to other pages or additional information.
<a href="#" class="mds-tag mds-tag--link">Alphabet Inc</a>
Use to enable tags to be removed.
<div class="mds-tag"> Equity
<button class="mds-button mds-button--icon-only mds-tag--dismissible__button" type="button" role="button">
<svg class="mds-icon mds-button__icon mds-button__icon--left">
<use xlink:href="/assets/icons/mds_icons.svg#remove--s">
<title>Dismiss Tag</title>
</use>
</svg>
</button>
</div>
remove-s
icon within the tag.Sizing affects text size and internal padding. The default size is small, and you can use a modifier class to make the tag larger (mds-tag--medium
).
<div class="mds-tag"> Shared </div>
$mds-space-1-x
(8px) for both horizontal and vertical spacing.title
tag on the dismiss icon with appropriate text for screen readers like “Remove Tag” or “Dismiss Tag.” See the accessibility guidelines for MDS icons for more information.
Class |
Applies to |
Outcome |
---|---|---|
|
|
Increases text size and internal padding. |
|
|
Adds Link styling to tag text. |
|
|
Dismisses the alert by animating a fade-out effect. |