Docs

Badge

Badge

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

Lotru
import * as React from "react";
 
import { Badge } from "@/components/ui/badge";
 
export function BadgeExample(): React.JSX.Element {
  return <Badge>Lotru</Badge>;
}

Installation

npx lotru@latest add ui/badge

Usage

import { Badge } from "@/components/ui/badge";
<Badge>Badge</Badge>

Examples

With a different variant

LotruLotruLotru
import * as React from "react";
 
import { Badge } from "@/components/ui/badge";
import { Stack } from "@/components/ui/stack";
 
export function BadgeExample(): React.JSX.Element {
  return (
    <Stack direction="row" gap={4} flexWrap="wrap">
      <Badge variant="solid">Lotru</Badge>
      <Badge variant="subtle">Lotru</Badge>
      <Badge variant="outline">Lotru</Badge>
    </Stack>
  );
}