shadimage
nostalgia-ui
uiretro-badgesource: ok · hit

RetroBadge

A Mac OS 9 styled badge with raised bevel effect, Geneva 9px font, and three color variants: default, accent (lavender), and azul.

npx shadcn add "https://nostalgia-ui.com/r/retro-badge.json"
free

Visual style

3dretro

Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.

Dependencies

Bundle weight · light
class-variance-authority

Registry dependencies

https://nostalgia-ui.com/r/nostalgia-theme.json

Files1 · source cached 10/15/2026, 9:29:11 AM

registry/new-york/ui/retro-badge.tsx
"use client"

import * as React from "react"
import { cva, type VariantProps } from "class-variance-authority"

import { cn } from "@/lib/utils"

const retroBadgeVariants = cva(
  [
    "inline-flex items-center whitespace-nowrap",
    "font-[family-name:var(--os9-font-heading)] text-[9px] leading-[1]",
    "px-2 py-0.5",
    "border border-os9-black",
    "shadow-[inset_1px_1px_0_var(--os9-white),inset_-1px_-1px_0_#808080]",
    "select-none",
  ],
  {
    variants: {
      variant: {
        default: "bg-os9-gray-300 text-os9-black",
        accent: "bg-os9-lavender text-os9-black",
        azul: "bg-os9-azul text-white",
      },
    },
    defaultVariants: {
      variant: "default",
    },
  }
)

function RetroBadge(
  {
    className,
    variant,
    ...props
  }: React.ComponentProps<"span"> &
    VariantProps<typeof retroBadgeVariants>,
  ref: React.ForwardedRef<HTMLSpanElement>
) {
  return (
    <span
      className={cn(retroBadgeVariants({ variant }), className)}
      ref={ref}
      {...props}
    />
  )
}

const ForwardedRetroBadge = React.forwardRef(RetroBadge)
ForwardedRetroBadge.displayName = "RetroBadge"

export { ForwardedRetroBadge as RetroBadge, retroBadgeVariants }

More from nostalgia-ui

Browse all components in this library →