# Kbd > Shows a keyboard key or shortcut. Source: https://shellui.dev/docs/v0.4/components/data-display/kbd `Kbd` is **new in v0.4**. It renders a `` element styled as a key cap, for shortcut hints in menus, tooltips and help text. ## Installation ```bash shellui add kbd ``` ## Usage ### Inline Use one `Kbd` per key. ```razor

Open the command palette with Ctrl K, or toggle the sidebar with Ctrl B.

``` ### Shortcut list ```razor
@foreach (var (label, keys) in shortcuts) {
@label @foreach (var key in keys) { @key }
}
@code { private readonly (string Label, string[] Keys)[] shortcuts = [ ("Search", ["Ctrl", "K"]), ("Save", ["Ctrl", "S"]), ("Toggle sidebar", ["Ctrl", "B"]), ("Close", ["Esc"]), ]; } ``` ## API Reference | Parameter | Type | Default | Description | |-----------|------|---------|-------------| | `ChildContent` | `RenderFragment?` | `null` | The key label | | `Class` | `string?` | `null` | Additional CSS classes | ## Accessibility - Uses the semantic `` element - `Kbd` only displays a shortcut. Handle the key press yourself, or use [Command Palette](https://shellui.dev/docs/v0.4/components/advanced/command-palette.md) for a ready-made Ctrl+K menu