Tag
A pill label with six color variants, an optional emoji or icon, and a removable mode that pops out before calling back.
Prerequisites
Tag needs icons, haptics, and Reanimated for its mount/remove pop.
npx expo install @hugeicons/core-free-icons @hugeicons/react-native expo-haptics react-native-reanimated
Install
npx @rslab/cli add tag
Usage
import { RocketIcon } from '@hugeicons/core-free-icons';
import { Tag } from '@/components/ui/Tag';
<Tag label="Remote" emoji="🌍" color="blue" />
<Tag label="Launch" icon={RocketIcon} color="purple" />
Make it removable and it pops out before your state updates:
<Tag
label="Senior"
color="green"
removable
onRemove={() => removeFilter('senior')}
/>Props
PropTypeDefault
labelstring-color?'neutral''blue''green''red''yellow''purple''neutral'emoji?string-A leading emoji. Takes priority over icon if both are set.
icon?HugeiconsIcon-A Hugeicons icon, shown when no emoji is set.
removable?booleanfalseShows a trailing X that animates the tag out before calling onRemove.
onRemove?() => void-Called once the exit animation finishes.
haptic?booleantrueMute the remove tick.
className?string-Extend or override the pill.
See exactly how this works with an RSLAB subscription.
Get Pro