Data display

Kbd

@xui/kbd

A keyboard-key cap. Put xuiKbd on a <kbd> and chain several to spell a shortcut — the natural label for a @xui/hotkeys binding.

Install

pnpm add @xui/kbd

Add the barrel to a standalone component's imports:

import { XuiKbdImports } from '@xui/kbd';

@Component({
  imports: [XuiKbdImports],
  // …
})

Examples

Basic

Loading preview…

Sizes

Loading preview…

In sentence

Loading preview…

API

XuiKbd

directivekbd[xuiKbd], [xuiKbd]

A keyboard-key cap. Put it on a <kbd> for the right semantics; chain several to spell a shortcut. Pairs with @xui/hotkeys for the binding side.

Variants

AxisOptionsDefaultsizesmmdlgmd

Inputs

NameTypeDefaultclassClassValueExtra classes, merged into the directive's own rather than replacing them.''sizeXuiKbdVariants['size']Key size, matched to the text it sits beside.this.config.size

Source

libs/ui/kbd/xui

xUI 2.0.0 — Apache 2.0 licensed. Built with Angular and Tailwind CSS.