Display

Shortcut List

A shortcut list: keys marked up with kbd and the plus sign in the markup, so a combination reads aloud as one.

  • kbd
  • shortcuts
  • help
  • keyboard

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.

put this in the header: https://vibeui.ru/c/kbd-001?lang=en

Keyboard shortcuts

Открыть поиск + K

Скопировать для ИИ + + C

Следующий компонентJ

Закрыть окноEsc

Show the full instructions

What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.

# Install and place "kbd-001" (Shortcut List) from VibeUI

## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/kbd-001.json

Registry item: https://vibeui.ru/r/kbd-001.json
Installs to: components/vibeui/kbd-001.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.

Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.

## 2. What it is
A shortcut list: keys marked up with kbd and the plus sign in the markup, so a combination reads aloud as one.

A list of shortcuts: the action on the left, the keys on the right as kbd elements with the plus in the markup. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Kbd001 } from "@/components/vibeui/kbd-001"

<Kbd001 rows={[{ action: "Search", keys: ["⌘", "K"] }]} />

Read the installed file for the full prop list.

## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.

Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)

## 5. Keep exactly as installed
- the local --vibeui-kbd-001-* palette — do not swap it for your theme tokens
- the kbd element: that is its purpose, and screen readers announce keys as input
- the plus in the markup rather than CSS — otherwise a combination reads as two keys
- the thicker bottom border: the key looks pressable
- the minimum key width so "K" and "Esc" line up
- the action left, keys right — that is how the list gets scanned

## 6. You may change
- the rows array of actions and keys
- title — the list heading
- the key colour and radius
- the block width

## 7. Rules
- Key glyphs depend on the platform: Windows needs Ctrl where macOS shows ⌘.
- The component listens to nothing: the caller binds the shortcuts.
- This is not a place for every key: show the ones that save time.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.

## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.

For developers

npx shadcn@latest add https://vibeui.ru/r/kbd-001.json
https://vibeui.ru/r/kbd-001.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-kbd-001-*. Серверный: хуков нет. Клавиши выводятся тегом kbd с утолщённой нижней гранью — так они читаются как физические. Разделитель между клавишами лежит в разметке, поэтому скринридер произносит «command плюс K», а не две отдельные клавиши.

Component source

The same file your agent installs. Here in case you would rather copy it by hand.

import type { ComponentPropsWithoutRef, CSSProperties } from "react"

export type Kbd001Props = Omit<ComponentPropsWithoutRef<"div">, "children"> & {
  rows?: { action: string; keys: string[] }[]
  title?: string
}

// Идея компонента: список горячих клавиш. Клавиши набраны тегом kbd — это его
// прямое назначение, и скринридер объявит их как ввод, а не как текст.
// Плюс между клавишами нарисован в разметке, а не в CSS: «⌘ + K» надо
// прочитать вслух, иначе сочетание превращается в две отдельные клавиши.
const STYLES = `
:where([data-vibeui-block="kbd-001"]){
--vibeui-kbd-001-bg:oklch(1 0 0);
--vibeui-kbd-001-fg:oklch(0.24 0.014 265);
--vibeui-kbd-001-muted:oklch(0.56 0.014 265);
--vibeui-kbd-001-border:oklch(0.88 0.008 265);
--vibeui-kbd-001-key:oklch(0.985 0.002 265);
--vibeui-kbd-001-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="kbd-001"]{
display:flex;flex-direction:column;gap:0.375rem;
width:100%;max-width:20rem;box-sizing:border-box;padding:0.875rem;
background:var(--vibeui-kbd-001-bg);
border:1px solid var(--vibeui-kbd-001-border);border-radius:0.875rem;
font-family:var(--vibeui-kbd-001-font);color:var(--vibeui-kbd-001-fg);
}
[data-vibeui-block="kbd-001"] [data-part="title"]{margin:0 0 0.125rem;font-size:0.875rem;font-weight:650}
[data-vibeui-block="kbd-001"] [data-part="row"]{
display:flex;align-items:center;justify-content:space-between;gap:0.75rem;
min-height:1.875rem;font-size:0.8125rem;
}
[data-vibeui-block="kbd-001"] [data-part="keys"]{display:inline-flex;align-items:center;gap:0.25rem;flex:none}
/* Клавиша — тег kbd: скринридер объявит её как ввод, а не как текст. */
[data-vibeui-block="kbd-001"] kbd{
display:inline-flex;align-items:center;justify-content:center;
min-width:1.5rem;height:1.5rem;padding:0 0.375rem;box-sizing:border-box;
border:1px solid var(--vibeui-kbd-001-border);border-bottom-width:2px;border-radius:0.375rem;
background:var(--vibeui-kbd-001-key);
font-family:inherit;font-size:0.75rem;font-weight:650;line-height:1;
}
[data-vibeui-block="kbd-001"] [data-part="plus"]{color:var(--vibeui-kbd-001-muted);font-size:0.6875rem}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="kbd-001"] *{animation:none!important;transition:none!important}}
`

const DEFAULT_ROWS = [
  { action: "Открыть поиск", keys: ["⌘", "K"] },
  { action: "Скопировать для ИИ", keys: ["⌘", "⇧", "C"] },
  { action: "Следующий компонент", keys: ["J"] },
  { action: "Закрыть окно", keys: ["Esc"] },
]

/**
 * Список горячих клавиш: клавиши тегом kbd, плюс между ними в разметке.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Kbd001({
  rows = DEFAULT_ROWS,
  title = "Горячие клавиши",
  className,
  style,
  ...props
}: Kbd001Props) {
  return (
    <>
      <style href="vibeui-kbd-001" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="kbd-001"
        className={className}
        style={style as CSSProperties}
      >
        {title ? <h3 data-part="title">{title}</h3> : null}
        {rows.map((row) => (
          <p key={row.action} data-part="row">
            <span>{row.action}</span>
            <span data-part="keys">
              {row.keys.map((key, index) => (
                <span key={key} data-part="key">
                  {index > 0 ? <span data-part="plus"> + </span> : null}
                  <kbd>{key}</kbd>
                </span>
              ))}
            </span>
          </p>
        ))}
      </div>
    </>
  )
}