Badge

Description

The Badge component is used to display a small badge with various style variants.

Usage

Badge

import { Badge } from "mogora-ui";

export default function BadgeDemo() {
  return (
    <Badge variant={"primary"}>Badge</Badge>
  )
}
Variants

API Reference

Badge

A badge component that can be customized with various variants.

PropTypeDescription
classNamestring(Optional) Adds a custom class for styling
childrenReactNodeContent inside the badge.
variant"primary" | "secondary" | "outline" | "ghost"Badge appearance variants.

Varian Badge

VariantDescription
primaryBackground bg-primary, text text-white.
secondaryBackground bg-secondary, text text-secondary-foreground.
outlineText colored text-foreground, without a background.
ghostText colored text-primary, without a background.