Data display
Badge
tag/pill/count · tint with semantic classes
function BadgeDemo() { return ( <View className="gap-2"> <View className="flex-row flex-wrap gap-2"> <Badge> <Text>Default</Text> </Badge> <Badge variant="secondary"> <Text>Secondary</Text> </Badge> <Badge variant="destructive"> <Text>Destructive</Text> </Badge> <Badge variant="outline"> <Text>Outline</Text> </Badge> </View> <View className="flex-row flex-wrap gap-2"> <Badge className="bg-success"> <Icon as={BadgeCheckIcon} className="text-success-foreground" /> <Text className="text-success-foreground">Verified</Text> </Badge> <Badge className="min-w-5 rounded-full px-1"> <Text>8</Text> </Badge> <Badge className="min-w-5 rounded-full px-1" variant="destructive"> <Text>99+</Text> </Badge> </View> <View className="flex-row flex-wrap items-center gap-2"> <Badge size="sm" variant="secondary"> <Text>Small</Text> </Badge> <Badge variant="secondary"> <Text>Medium</Text> </Badge> </View> </View> );}Usage
Tint with a semantic class (bg-success + text-success-foreground), never a raw colour.
API
<Badge variant="default|secondary|destructive|outline" size?="sm|md"><Text /></Badge>Get it
Already in every copy of the native kit:
import { Badge } from '@/components/ui/badge';Details
- Exports
Badge- Packages
- @rn-primitives/slot@^1.5.2, class-variance-authority@^0.7.1
- Installs with
- @halftone-native/icon, @halftone-native/lib-component-classes, @halftone-native/lib-palette-context, @halftone-native/lib-theme, @halftone-native/lib-utils, @halftone-native/text
- Also searched as
- tag, chip, pill, count, status
- Registry JSON
- /r/native/badge.json
<Row> <Badge>Default</Badge> <Badge variant="secondary">Secondary</Badge> <Badge variant="outline">Outline</Badge> <Badge variant="destructive">Destructive</Badge> <StatusBadge dot="bg-success">Paid</StatusBadge> <StatusBadge dot="bg-warning">Pending</StatusBadge> <Badge size="sm" variant="secondary"> Small </Badge></Row>API
<Badge variant? size?="sm|md">Label</Badge>Get it
Already in every copy of the web kit:
import { Badge, badgeVariants } from '@/components/ui/badge';Details
- Exports
Badge,badgeVariants- Packages
- class-variance-authority@^0.7.1, cn@^0.5.2, radix-ui@^1.7.0
- Also searched as
- tag, pill, status
- Registry JSON
- /r/web/badge.json
Agents: the whole registry is at /llms.txt.