import React from 'react'; import type { IconOrContent } from '../../util/utility-types'; import type { Emphasis, Status } from '../../util/variant-types'; type Props = { /** * CSS class names that can be appended to the component for styling. */ className?: string; /** * CSS properties defined for the HTML element. Includes the component's CSS Custom Properties: * * - `--tag__bg` * - `--tag__border` * - `--tag__fg` */ style?: TagCSSProperties; /** * Controls how much the tag stands out. **NOTE**: emphasis can only be set to "low" when status is "informational". * * **Default is `"high"`**. */ emphasis?: Emphasis; /** * Leading slot for the tag. Takes an EDS icon name, or any content to render in its * place at 16px. */ icon?: IconOrContent; /** * The text contents of the tag, nested inside the component. */ label?: string; /** * Status for the component state */ status?: Status; }; export interface TagCSSProperties extends React.CSSProperties { /** * Custom property to customize the background color of this component (e.g., background color) */ '--tag__bg'?: string; /** * Custom property to customize the border color of this component */ '--tag__border'?: string; /** * Custom property to customize the foreground color of this component (e.g., text, icon, etc.) */ '--tag__fg'?: string; } /** * ## Usage * * | Type/Use | Description | Example | * |----------|-------------|---------| * | State indicators | Shows the current status of an item or process. | A green "Active" tag for a user profile. | * | Availability | Indicates if something is available or not. | "Available" or "Unavailable" tag for a product. | * | Progress / Workflow | Marks the stage in a workflow or pipeline. | "In Review," "Draft," or "Completed" tags for a document. | * | Urgency / Priority | Highlights critical items needing attention. | "High Priority" or "Urgent" tag in a task list. | * | Validation status | Shows whether an item passed or failed validation. | "Valid" or "Error" status tags for form inputs. | * | New or updated content | Marks new or recently changed items. | A "New" or "Updated" tag for an article or notification. | * * ### Best Practices * * * Use short labels, keeping them to 1-2 words since tags represent discrete pieces of information. * * When using multiple tags together, separate them with 16px of space. * * Use tag status variants that are appropriate for the tag's content. * * Don't use tags solely for their colors or in a semantically incorrect way. If you need color-coded tags that are not tied to a particular status, reach out to EDS. * * ## Content & Accessibility * * ### Do's * * * Keep labels to 1-2 words. * * Remember that tags represent discrete pieces of information. * * ### Don'ts * * * Don't overload users with excessive content, which increases cognitive load. * * Don't rely on just color to communicate status—add text or icons. */ export declare const Tag: { ({ className, emphasis, icon, label, status, style, }: Props): React.JSX.Element; displayName: string; }; export {};