qat

Keyboard keys

Kbd. It is copied into your app’s ui/ by qatjs add kbd: the code is yours to edit.

Example

⌘K opens the palette; Esc closes it

Example.qx9 linesOpen in the playground
import Kbd from './ui/kbd/kbd.qx'

export default function Example() {
  return (
    <p>
      <Kbd keys="⌘+K" /> opens the palette; <Kbd keys="Esc" /> closes it
    </p>
  )
}

Add it

shell1 line
npx qatjs add kbd

Kbd

As a custom element: <ui-kbd>.

Kbd: props
PropTypeAttribute
keysstringyes
labelstringyes