Skip to content

Tag

The Tag component displays labels, categories, or tags with support for left/right icons and close functionality.

Default TagWith Left IconWith Right IconClosable Tag
import { Tag } from '@fintech-sandpit/ui/react';
import { faTag } from '@fortawesome/free-solid-svg-icons';
return (
<Tag
colorScheme="primary"
leftIcon={faTag}
>
Label
</Tag>
);
NameTypeDefaultDescription
colorSchemeColorSchemeneutralColor scheme
sizeSizemdTag size
variantTagVariantsubtleVisual variant
leftIconIconDefinitionLeft icon definition 1
rightIconIconDefinitionRight icon definition 1
closablebooleanfalseWhether the tag can be closed
  1. See Icons for the list of available icon definitions.
NameTypeDescription
onClose() => voidClose event
type ColorScheme = 'neutral' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger'
type TagSize = 'sm' | 'md' | 'lg'
type TagVariant = 'subtle' | 'solid' | 'outline'