Components

Badge

Small label component for status, categories, or counts with variant and size options.

iOSAndroid
Preview Badge on your device

Scan with Expo Go

Download Expo Go, then scan the QR code to preview native components.

Installation

pnpm dlx @docyrus/cli add @docyrus/rn-badge
Required Packages(1 package)
pnpm add react-native-reanimated

Usage

import { Badge } from '@/components/docyrus-native/badge';

<Badge>Default</Badge>
<Badge variant="secondary">Secondary</Badge>
<Badge variant="destructive" size="lg">Error</Badge>

API Reference

PropTypeDefaultDescription
childrenReactNode—Badge content
variant'default' | 'secondary' | 'destructive' | 'outline''default'Visual style variant
size'sm' | 'md' | 'lg''md'Badge size
classNamestring—Additional CSS classes
textClassNamestring—Text CSS classes

Type Exports

TypeDescription
BadgePropsProps for Badge component
BadgeVariant'default' | 'secondary' | 'destructive' | 'outline'
BadgeSize'sm' | 'md' | 'lg'

On this page