Menus & Actions

Interactive Keyboard

클릭과 실제 키 입력 상태를 함께 보여주는 맥 스타일 키보드입니다.

Preview

desktop only

Interactive Keyboard

desktop keyboard preview

Desktop preview

Installation

bash
Copied
1pnpm dlx shadcn@latest add https://ryong-blog.vercel.app/r/keyboard.json

Code

typescript
Copied
1import { Keyboard } from "@/components/keyboard"23export default function Example() {4  return <Keyboard showPreview />5}

Props

className

Type
string
Default
-
Description
Additional classes merged onto the component.

showPreview

Type
boolean
Default
false
Description
Whether to show the last pressed key above the keyboard.

enableSound

Type
boolean
Default
false
Description
Reserved hook for adding key sounds without bundling audio assets.

keys

Type
string[]
Default
-
Description
Optional shortcut mode for compact key combinations.

keyClassName

Type
string
Default
-
Description
Classes applied to shortcut keys.

Reference

Aceternity Keyboard