Skip to content
Logic2BUI

Search docs

Search components and documentation

New
Menu

Badge

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

BadgeSecondaryOutlineDestructive

Installation

npx logic2b@latest add badge

Usage

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

<Badge variant="outline">Badge</Badge>

Use asChild to render a link that looks like a badge.

API

Prop Type Default
variant default | secondary | destructive | outline default
asChild boolean — render as the child element (e.g. an a) false

Examples

With icon

A leading svg icon is sized and spaced automatically.

Verified3 newOverdue

Use asChild to render an anchor that looks like a badge.