Skip to content
synccn

Kbd

Keyboard key for shortcuts and hints.

Open command menu⌘K
Toggle theme⌘J
Focus search/
Close dialogEsc

Installation

$ pnpm dlx shadcn@latest add @synccn/kbd

First time in this project? Connect synccn with one command.

Usage

import { Kbd } from "@/components/ui/kbd";<Kbd>⌘</Kbd><Kbd>K</Kbd>

API reference

Generated from the component's TypeScript types, so it always matches the code.

  • className
    string

    Extra classes for the root element.

  • children
    React.ReactNode

    Content to render.

Also accepts every standard <div> attribute, and forwards its ref.

Dependencies

Read from the component's imports when the site builds. The CLI installs all of these for you.

Helpers

npm packages

Accessibility

From the source

Read from this component's code when the site builds, so it can't drift.

  • ARIA roles: separator
  • ARIA attributes: aria-orientation