// Data Display
Kbd
Styled representation of a single key.
// Rendering preview…
// Install
npx shadcn@latest add @dakik/kbd// Usage
1import { Kbd, KbdGroup } from "@/components/ui/kbd";23<Kbd />// Code
1"use client";23import { ark } from "@ark-ui/react/factory";4import type React from "react";5import { tv, type VariantProps } from "tailwind-variants";6import { cn } from "@/lib/utils";78const kbdVariants = tv({9 base: [10 "h-5 min-w-5",11 "px-1",12 "inline-flex items-center justify-center gap-1",13 "select-none font-medium font-sans text-foreground text-xs",14 "rounded-sm border border-transparent",15 "pointer-events-none",16 "in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background",17 "[&_svg:not([class*='size-'])]:size-3",18 ],19 variants: {20 variant: {21 default: "bg-muted",22 outline: "border border-border",23 },24 },25 defaultVariants: {26 variant: "default",27 },28});// Dependencies