JGuang / JGuang UI
Components组件Base UIBase UI 组件

Kbd

Used to display textual user input from keyboard.

Partially translated: Chinese navigation, titles, descriptions, and common headings. The technical body is currently in English.
Loading JGuang UI example…

Installation

Command

Manual

Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.

Copy and paste the following code into your project.

View complete source: components/ui/kbd.tsx

Update the import paths to match your project setup.

Usage

import { Kbd } from "@/components/ui/kbd"
<Kbd>Ctrl</Kbd>

Composition

Use the following composition to build Kbd and KbdGroup:

Kbd
KbdGroup
├── Kbd
└── Kbd

Group

Use the KbdGroup component to group keyboard keys together.

Loading JGuang UI example…

Button

Use the Kbd component inside a Button component to display a keyboard key inside a button.

Loading JGuang UI example…

Tooltip

You can use the Kbd component inside a Tooltip component to display a tooltip with a keyboard key.

Loading JGuang UI example…

Input Group

You can use the Kbd component inside a InputGroupAddon component to display a keyboard key inside an input group.

Loading JGuang UI example…

RTL

To enable RTL support in JGuang UI, see the RTL configuration guide.

Loading JGuang UI example…

API Reference

Kbd

Use the Kbd component to display a keyboard key.

PropTypeDefault
classNamestring``
<Kbd>Ctrl</Kbd>

KbdGroup

Use the KbdGroup component to group Kbd components together.

PropTypeDefault
classNamestring``
<KbdGroup>
  <Kbd>Ctrl</Kbd>
  <Kbd>B</Kbd>
</KbdGroup>

Source: components/base/kbd.mdx

Technical documentation for JGuang UI.

On this page