Tag
A Tag is one word that describes a specific aspect of an asset. A single asset can have multiple tags. Use tags to highlight an item's status for quick recognition and navigation Use color to indicate meanings that users can learn and recognize across products It leverages the Chip component from Material UI
import { HvTag } from "@hitachivantara/uikit-react-core";
Different colors
You can change the default color of the tag by passing a color name from the UI Kit color palette, a CSS color name or a hex color code.
Long text
The tag component will automatically truncate the text if it is too long to fit in the container. You can add a tooltip to show the full text when the user hovers over the tag.
Actions
Tags can have actions. Use the onClick
prop to add an action to the tag.
Deletable tags
You can add a delete button to the tag by using the onDelete
prop.
Controlled selectable state
To use the selectable tags in a controlled way, set the selected
prop to true
of false
.
Asset 1, Asset 3