jengacore.shadcn registry · Tailwind v4 · Radix and Base UI
Components
shadcn, restyled · @jengacore/kbd

Kbd

Keyboard hint in Geist Mono.

Install

terminal
npx shadcn@latest add @jengacore/kbd

Without the namespace configured: npx shadcn@latest add https://ui.jengacore.com/r/<new-york-v4|base-nova>/kbd.json

Registry dependencies

Source

components/ui/kbd.tsx
import * as React from "react"

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

/** Keyboard hint, Geist Mono on `muted`. */
function Kbd({ className, ...props }: React.ComponentProps<"kbd">) {
  return (
    <kbd
      data-slot="kbd"
      className={cn(
        "pointer-events-none inline-flex h-[18px] min-w-[18px] items-center justify-center gap-1 rounded-[3px] border border-border bg-muted px-1 font-mono text-[10.5px] leading-4 font-medium text-muted-foreground select-none [&_svg:not([class*='size-'])]:size-3",
        className
      )}
      {...props}
    />
  )
}

function KbdGroup({ className, ...props }: React.ComponentProps<"kbd">) {
  return <kbd data-slot="kbd-group" className={cn("inline-flex items-center gap-1", className)} {...props} />
}

export { Kbd, KbdGroup }