Learn about the Tag component for use in UI extensions.
Tag
component renders a tag to label or categorize information or other components. Tags can be static or clickable for invoking functions.
Prop | Type | Description |
---|---|---|
variant | 'default' (default) | 'warning' | 'success' | 'error' | 'info' | The color of the alert. See the variants section for more information. |
onClick | () => void | A function that will be invoked when the tag is clicked. The function receives no arguments and its return value is ignored. |
overlay | Object | Include a Modal or Panel component in this object to open it as an overlay on click. Learn more about using overlays. |
variant
prop, you can choose from one of five tag colors:
default
(default): for general tagging and labeling.success
: for indicating or confirming the success of an action.warning
: for indicating something that might be time-sensitive or of importance.error
: for indicating error or failure.info
: for conveying general information.inline
prop, you can set a tag to align side-by-side with surrounding text. Below are examples of inline tags next to single-line text and multi-line text.
default
tag to indicate that a customer is active.success
tag to indicate that an item in a to-do list has been completed.warning
tag to indicate that a deal is expiring soon.error
tag to indicate that an error happened when trying to sync a specific property in a table.