2.0.0
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 class="mds-tag mds-tag--link" href="#"> 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">
<svg class="mds-icon mds-button__icon mds-button__icon--left">
<use xlink:href="/icons/mds.svg#remove--s">
<title>Dismiss Tag</title>
</use>
</svg>
</button>
</div>
remove-s
icon within the tag.Apply the mds-tag-group
class to a wrapping container to add $mds-space-1-x
as right and bottom margin to each tag.
<div class="mds-tag-group">
<div class="mds-tag"> Equity </div>
<div class="mds-tag"> Manager </div>
<div class="mds-tag"> Macro </div>
<div class="mds-tag"> Retirement </div>
<div class="mds-tag"> Fixed Income </div>
<div class="mds-tag"> Managed Investments </div>
</div>
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>
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. |
|
|
Initializes a wrapping container to properly space a group of tags. |