---
title: Kbd
description: Used to display textual user input from keyboard.
component: true
---
## Installation
CLI
Manual
```bash
npx shadcn@latest add kbd
```
Copy and paste the following code into your project.
Update the import paths to match your project setup.
## Usage
```tsx
import { Kbd } from "@/components/ui/kbd"
```
```tsx
Ctrl
```
## Examples
### Group
Use the `KbdGroup` component to group keyboard keys together.
### Button
Use the `Kbd` component inside a `Button` component to display a keyboard key inside a button.
### Tooltip
You can use the `Kbd` component inside a `Tooltip` component to display a tooltip with a keyboard key.
### Input Group
You can use the `Kbd` component inside a `InputGroupAddon` component to display a keyboard key inside an input group.
## API Reference
### Kbd
Use the `Kbd` component to display a keyboard key.
| Prop | Type | Default |
| ----------- | -------- | ------- |
| `className` | `string` | `` |
```tsx
Ctrl
```
### KbdGroup
Use the `KbdGroup` component to group `Kbd` components together.
| Prop | Type | Default |
| ----------- | -------- | ------- |
| `className` | `string` | `` |
```tsx
Ctrl
B
```