| name | groww-tag-pill |
| description | Tag and Pill components for labels, badges, and status indicators. Use for categories, status labels, or inline metadata. |
Groww Tag and Pill Components
Import Patterns
import Tag from '@groww-tech/ui-toolkit/dist/esm/components/atoms/Tag';
import Pill from '@groww-tech/ui-toolkit/dist/esm/components/atoms/Pill';
import { Tag, Pill } from '@groww-tech/ui-toolkit';
Key APIs
Props (Tag)
interface TagProps {
children: React.ReactNode;
isWarning?: boolean;
isError?: boolean;
isInfo?: boolean;
tagClass?: string;
className?: string;
}
Props (Pill)
interface PillProps {
children: React.ReactNode;
type?: 'default' | 'success' | 'warning' | 'error' | 'info';
onRemove?: () => void;
size?: 'small' | 'medium';
className?: string;
}
Usage Examples
Tag Variants
<Tag>New</Tag>
<Tag isWarning>Pending</Tag>
<Tag isError>Failed</Tag>
<Tag isInfo>In Progress</Tag>
Pill
<Pill>Active</Pill>
<Pill type="success">Verified</Pill>
<Pill onRemove={() => handleRemove(tagId)}>
Removable
</Pill>
Anti-Patterns
- Don't overuse: Too many tags clutter UI
- Don't use for actions: Use buttons instead
- Don't forget color meaning: Consistent color = consistent meaning
- Don't forget accessibility: Ensure screen readers can read
- Don't mix Tag and Pill: Choose one and use consistently