Kbd

GitHub
Display keyboard shortcuts and key combinations with proper styling.

Usage

Use the kbd component to display a Kbd in your content.

K

:kbd{value="meta"} :kbd{value="K"}

API

Props

Prop Default Type
value

string

Theme

app.config.ts
export default defineAppConfig({
  ui: {
    prose: {
      kbd: {
        base: 'align-text-top'
      }
    }
  }
})
vite.config.ts
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import ui from '@nuxt/ui/vite'

export default defineConfig({
  plugins: [
    vue(),
    ui({
      ui: {
        prose: {
          kbd: {
            base: 'align-text-top'
          }
        }
      }
    })
  ]
})

Changelog

5cb65 — feat: import @nuxt/ui-pro components

f3366 — feat: add color prop & soft variant (#4549)

39c86 — fix: refactor types after @nuxt/module-builder upgrade (#3855)