PXD

Kbd

Display keyboard input that triggers an action.

Modifiers

⌘ ⇧ ⌥ Ctrl
<template>
  <PStack gap="2">
    <PKbd meta />
    <PKbd shift />
    <PKbd alt />
    <PKbd ctrl />
  </PStack>
</template>

Combination

⌘⇧
<template>
  <PKbd meta shift />
</template>

Sizes

P P P
<template>
  <PStack align="center" gap="2">
    <PKbd size="sm">P</PKbd>
    <PKbd size="md">P</PKbd>
    <PKbd size="lg">P</PKbd>
  </PStack>
</template>

Props

NameTypeDefaultDescription
altboolean-Render the ⌥ symbol for the Option key
ctrlboolean-Render the Ctrl text for the Control key
metaboolean-Render the ⌘ symbol for the Command key
enterboolean-Render the ↵ symbol for the Enter key
shiftboolean-Render the ⇧ symbol for the Shift key
labelstring | number | null-Content rendered after the key symbols
size'sm' | 'md' | 'lg'-Key size, falls back to the global config provider size

Slots

NameDescription
defaultDefault slot

Source

Source