Badge

Displays a badge or a component that looks like a badge.

Installation

npx lovdacn@latest add badge

(You can also use the shortened lvcn alias, e.g., npx lvcn@latest add badge)

This copies the component source into your project (typically components/ui/badge.tsx) and installs any required dependencies.

Registry dependencies: utils, text

Usage

import { Badge } from "@/components/ui/badge"
import { Text } from "@/components/ui/text"

export function Example() {
  return (
    <Badge>
      <Text>Badge</Text>
    </Badge>
  )
}

Variants

<Badge><Text>Default</Text></Badge>
<Badge variant="secondary"><Text>Secondary</Text></Badge>
<Badge variant="outline"><Text>Outline</Text></Badge>
<Badge variant="destructive"><Text>Destructive</Text></Badge>

Styles

lvcn components are available across all style packs:

StyleNotes
defaultClassic rounded system
new-yorkCompact, refined
novaSharp corners (default in many setups)
luma / lyra / maia / miraRadius & font variants
rhea / sera / vegaPill, zero-radius, balanced

Style is set at project init via lvcn.json (style + styleEngine).

Platform

These components target Expo / React Native with NativeWind or Uniwind. They use Platform.select where web and native need different behavior.