The Tag component displays labels, categories, or tags with support for left/right icons and close functionality.
Default TagWith Left IconWith Right IconClosable Tag Default Tag With Left Icon With Right Icon Closable Tag
import { Tag } from '@fintech-sandpit/ui/react';
import { faTag } from '@fortawesome/free-solid-svg-icons';
import { Tag } from '@fintech-sandpit/ui/vue';
import { faTag } from '@fortawesome/free-solid-svg-icons';
| Name | Type | Default | Description |
|---|
colorScheme | ColorScheme | neutral | Color scheme |
size | Size | md | Tag size |
variant | TagVariant | subtle | Visual variant |
leftIcon | IconDefinition | | Left icon definition 1 |
rightIcon | IconDefinition | | Right icon definition 1 |
closable | boolean | false | Whether the tag can be closed |
| Name | Type | Default | Description |
|---|
color-scheme | ColorScheme | neutral | Color scheme |
size | Size | md | Tag size |
variant | TagVariant | subtle | Visual variant |
left-icon | IconDefinition | | Left icon definition 1 |
right-icon | IconDefinition | | Right icon definition 1 |
closable | boolean | false | Whether the tag can be closed |
- See Icons for the list of available icon definitions.
| Name | Type | Description |
|---|
onClose | () => void | Close event |
| Name | Payload | Description |
|---|
close | void | Close event |
type ColorScheme = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'
type TagSize = 'sm' | 'md' | 'lg'
type TagVariant = 'subtle' | 'solid' | 'outline'