Kbd
Use the kbd shortcode to show a keyboard input element.
Use the kbd
shortcode to show a keyboard input element. As an example, the following shortcodes shows a simple CTRL-C
command.
{{< kbd "CTRL-C" >}}
The shortcode supports the following arguments:
Argument | Required | Description |
---|---|---|
title | Yes | Required title of the keyboard input. In shorthand notation, this is the first (and only) matched argument. |
class | No | Optional class attributes of the keyboard input element. |
color | No | Optional theme color of the element, either “primary”, “secondary”, “success”, “danger”, “warning”, “info”, “light”, “dark”, “white”, or “black”. By default, no theme color is used. |
Set a background color with contrasting foreground color with the color
argument.
{{< kbd title="primary" color="primary" >}}
{{< kbd title="secondary" color="secondary" >}}
{{< kbd title="success" color="success" >}}
{{< kbd title="danger" color="danger" >}}
{{< kbd title="warning" color="warning" >}}
{{< kbd title="info" color="info" >}}
{{< kbd title="light" color="light" >}}
{{< kbd title="dark" color="dark" >}}