Tag
Compact element to display information about an entity.
View source code- children
ReactNode
The content to display in the tag.
- className
string
className for the element
- iconName
"adjustments-horizontal" | "archive" | "arrow-down-tray" | "arrow-down" | "arrow-left-right" | "arrow-left" | "arrow-path" | "arrow-right-rectangle" | "arrow-right" | "arrow-split" | "arrow-top-right-square" | "arrow-turn-right" | "arrow-up-tray" | "arrow-up" | "arrow-uturn-left-down" | "arrow-uturn-right-top" | ... 140 more ...
The icon to display in the Tag
- key
Key
- onClose
MouseEventHandler<HTMLButtonElement>
Handler that is called when the close icon is clicked
- ref
Ref<HTMLButtonElement>
Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs}
- variant
"alert" | "carbon" | "forest" | "grolive" | "info" | "lemon" | "neutral" | "ocean" | "peach" | "pink" | "purple" | "success" | "warning" | "white"
The visual style of the Tag
Default: carbon