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:
| Name | Type | Required | Default | Comment |
|---|---|---|---|---|
| class | string | Class attribute of the keyboard input element. | ||
| color | select | secondary | Theme color of the element. Supported values: [primary, secondary, success, danger, warning, info, light, dark, white, black]. | |
| title | string | yes | Title of the keyboard input. In shorthand notation, this is the first (and only) matched argument. |
| Name | Type | Required | Default |
|---|---|---|---|
| class | string | ||
| Class attribute of the keyboard input element. | |||
| color | select | secondary | |
| Theme color of the element. Supported values: [primary, secondary, success, danger, warning, info, light, dark, white, black]. | |||
| title | string | yes | |
| Title of the keyboard input. In shorthand notation, this is the first (and only) matched argument. | |||
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" >}}