# markdown-it-kbd

> Markdown-it syntax add-on for keystrokes. Renders [[x]] as x

Latest version **3.0.2** (published 2025-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install markdown-it-kbd
pnpm add markdown-it-kbd
yarn add markdown-it-kbd
bun add markdown-it-kbd
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2025-11-09 |
| First published | 2016-11-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20.0.0 |
| Dependencies | 0 |
| Unpacked size | 6.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 24 |
| Author | Joshua Gleitze |
| Maintainers | jgleitz |
| Keywords | markdown-it, markdown-it-plugin, keystroke, kbd |

## Links

- npm: https://www.npmjs.com/package/markdown-it-kbd
- Repository: https://github.com/jGleitz/markdown-it-kbd
- Issues: https://github.com/jGleitz/markdown-it-kbd/issues
- npm.io page: https://npm.io/package/markdown-it-kbd

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 3.0.2 (latest) — 2025-11-09
- 3.0.1 — 2025-11-09
- 3.0.0 — 2025-04-01
- 2.2.2 — 2021-03-06
- 2.2.1 — 2021-03-06
- 2.2.0 — 2020-07-06
- 2.1.0 — 2020-07-06
- 2.0.0 — 2018-11-29
- 1.1.1 — 2017-11-22
- 1.1.0 — 2017-01-03
- 1.0.1 — 2016-11-06

## README

# markdown-it-kbd [![CI](https://github.com/jGleitz/markdown-it-kbd/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/jGleitz/markdown-it-kbd/actions/workflows/ci.yml?query=branch%3Amain) [![NPM Version](https://img.shields.io/npm/v/markdown-it-kbd?logo=npm&logoColor=%23DDD)](https://www.npmjs.com/package/markdown-it-kbd)
> [markdown-it](https://github.com/markdown-it/markdown-it) plugin for keystrokes

Renders `[[x]]` as `<kbd>x</kbd>`. ([`<kbd>`](http://www.w3schools.com/tags/tag_kbd.asp) is the tag for keystrokes).

## Usage
```js
const md = require('markdown-it')();
const kbd = require('markdown-it-kbd');

md.use(kbd);
```

This plugin can also be used together with [`markdown-it-attrs`](https://github.com/arve0/markdown-it-attrs/).

## Syntax notes

The end tag `]]` must be on the same line as the start tag `[[`.

The characters “`[`” and “`]`” are not allowed within keystroke tags.
If you need to use them, escape them with a backslash (i.e. `\[` or `\]`) or use HTML escape sequences (`&#91` for `[` or `&#93;` for `]`).

---
_Source: https://npm.io/package/markdown-it-kbd · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
