Tags are used for items that need to be labeled, categorized, or organized using keywords that describe them.
import { Text } from "@wfp/react"
The Tag
component is a versatile UI element used to label, categorize, or organize items using keywords. It's an essential part of the user interface, allowing for the easy identification and grouping of items based on their attributes or statuses.
<> <Tag type="info">Info</Tag> <Tag type="warning">Warning</Tag> <Tag type="error">Error</Tag> <Tag type="success">Success</Tag> <Tag type="custom">Custom (without formatting)</Tag> </>;
Customize the colors of the Tag
by passing a style
or className
prop.
<> <Tag type="custom" style={{ color: "#ff0000", background: "yellow" }} > Custom </Tag> </>;
type
prop allows for the customization of the tag based on predefined types or custom strings.className
prop for further styling.HTMLSpanElement
, allowing for standard HTML attributes like id
, style
, etc., to be applied.