Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Vim Command Sequence Kbd for Vue

Colon, W, and Q in a row, the three presses for Vim's save-and-quit command, shown as separate caps.

UI library: Ark UI

Three caps read colon, W, and Q, with a small gap. They are a sequence, not a chord, because they are not in a group. The demo does not run the command.

Use a tight row for a typed command. For keys held together, use a group. If quit would discard work, confirm in an Alert Dialog. In Vue, Ark UI does not run the command.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Kbd anatomy: kbd, group

Usage

<div class="rounded-md border bg-background p-4">
  <div class="flex items-center gap-1"><Kbd>:</Kbd><Kbd>W</Kbd><Kbd>Q</Kbd></div>
</div>

FAQ

What is Vim's command mode?

Typing a colon in normal mode opens a command line at the bottom of the screen. You type a command, like wq, and press Enter to run it, or Esc to cancel.

Why so little space between the keys?

The keys are typed as one word, so gap-1 keeps them together. A wider gap, or an arrow, would suggest separate steps with a pause between them.

Are Vim commands case-sensitive?

Yes: the command is :wq in lowercase, and :WQ fails. The caps show capital letters because that's what keyboards print; say lowercase in the text, or show the command in code next to the keys.

Which Vim commands are worth documenting?

:w to save, :q to quit, :wq to save and quit, :q! to quit without saving, and / to search. Those get most people in and out of Vim.

Why wq instead of write quit?

Vim commands have short forms so they're quick to type: w is short for write and q for quit. The full forms, like :write, work too.

Do screen readers read the sequence correctly?

They read colon, W, Q as separate characters, which matches what to type. Add the command in text, such as Type :wq and press Enter, so the Enter step isn't missed.

API Reference

Kbd

No extra props in this demo. The rest is on the Kbd page.