# Badge

A pill label with color, background, border, and uppercase options.

> For the complete documentation index, see [llms.txt](/llms.txt). Markdown variants are available by appending `.md` to any URL or sending an `Accept: text/markdown` header. An agent skill is available at [/.well-known/agent-skills/site-skill.md](/.well-known/agent-skills/site-skill.md).



<ComponentPreview name="badge" />

## Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger value="cli">
      Command
    </TabsTrigger>

    <TabsTrigger value="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent value="cli">
    ```bash
    npx shadcn@latest add @ogimagecn/badge
    ```
  </TabsContent>

  <TabsContent value="manual">
    <Steps>
      <Step>
        Copy and paste the following code into your project.
      </Step>

      <ComponentSource name="badge" title="components/og/badge.tsx" />

      <Step>
        Update the import paths to match your project setup.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Usage [#usage]

```tsx
import { Badge } from "@/components/og/badge";
```

```tsx
<Badge background="rgba(124,58,237,0.15)" color="#7c3aed" uppercase>
  Engineering
</Badge>
```

## API Reference [#api-reference]

| Prop          | Type            | Default |
| ------------- | --------------- | ------- |
| `children`    | `ReactNode`     | —       |
| `color`       | `string`        | —       |
| `background`  | `string`        | —       |
| `borderColor` | `string`        | —       |
| `uppercase`   | `boolean`       | `false` |
| `style`       | `CSSProperties` | —       |
