Home / Function/ BadgeAsLink() — ui Function Reference

BadgeAsLink() — ui Function Reference

Architecture documentation for the BadgeAsLink() function in badge-example.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  e2400f1d_3242_be00_71b1_be67d6e35ec1["BadgeAsLink()"]
  fc1ee748_75b6_9e50_9292_c5d6362e98a5["badge-example.tsx"]
  e2400f1d_3242_be00_71b1_be67d6e35ec1 -->|defined in| fc1ee748_75b6_9e50_9292_c5d6362e98a5
  style e2400f1d_3242_be00_71b1_be67d6e35ec1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/bases/base/examples/badge-example.tsx lines 221–291

function BadgeAsLink() {
  return (
    <Example title="asChild">
      <div className="flex flex-wrap gap-2">
        <Badge
          render={
            <a href="#">
              Link{" "}
              <IconPlaceholder
                lucide="ArrowUpRightIcon"
                tabler="IconArrowUpRight"
                hugeicons="ArrowUpRightIcon"
                phosphor="ArrowUpRightIcon"
                remixicon="RiArrowRightUpLine"
                data-icon="inline-end"
              />
            </a>
          }
        />
        <Badge
          variant="secondary"
          render={
            <a href="#">
              Link{" "}
              <IconPlaceholder
                lucide="ArrowUpRightIcon"
                tabler="IconArrowUpRight"
                hugeicons="ArrowUpRightIcon"
                phosphor="ArrowUpRightIcon"
                remixicon="RiArrowRightUpLine"
                data-icon="inline-end"
              />
            </a>
          }
        />
        <Badge
          variant="destructive"
          render={
            <a href="#">
              Link{" "}
              <IconPlaceholder
                lucide="ArrowUpRightIcon"
                tabler="IconArrowUpRight"
                hugeicons="ArrowUpRightIcon"
                phosphor="ArrowUpRightIcon"
                remixicon="RiArrowRightUpLine"
                data-icon="inline-end"
              />
            </a>
          }
        />
        <Badge
          variant="ghost"
          render={
            <a href="#">
              Link{" "}
              <IconPlaceholder
                lucide="ArrowUpRightIcon"
                tabler="IconArrowUpRight"
                hugeicons="ArrowRight02Icon"
                phosphor="ArrowUpRightIcon"
                remixicon="RiArrowRightUpLine"
                data-icon="inline-end"
              />
            </a>
          }
        />
      </div>
    </Example>
  )
}

Subdomains

Frequently Asked Questions

What does BadgeAsLink() do?
BadgeAsLink() is a function in the ui codebase, defined in apps/v4/registry/bases/base/examples/badge-example.tsx.
Where is BadgeAsLink() defined?
BadgeAsLink() is defined in apps/v4/registry/bases/base/examples/badge-example.tsx at line 221.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free