C Kbd

A visual pattern used to allow users to learn how to access actions via keyboard.

Check the Lexicon Keys Pattern for a more in-depth look at the motivations and proper usage of this component.

Base

The c-kbd component provides base size and spacing styles for the kbd HTML element.

1.5rem (24px) minimum width and 1.5rem (24px) tall kbd element with padding-left, padding-right, and border-width: 1px.

Esc,Ctrl, Shift,Alt,+Shift+PP

Snippet

Nested C Kbd

Nest multiple .c-kbd elements inside a single .c-kbd element to describe a keyboard command comprising of multiple keys.

+Shift+YP+Shift+YP

Snippet

+Shift+Y+Shift+YP

Snippet

C Kbd Monospaced

1.5rem (24px) minimum width and 1.5rem (24px) tall kbd element with no padding and border-width: 1px. This is generally used to display single characters.

N

Snippet

C Kbd Inline

No minimum width or height kbd element with padding: 0 and border-width: 0. This is used to display keyboard shortcuts in small spaces such as dropdown-item.

The most robust markup to use is nested kbd elements:

Snippet

but the markup:

Snippet

works as well.

EscCtrlShiftAlt+Shift+YP

Snippet

C Kbd Group

A container element for grouping text with several kbd elements together. This is also useful inside autofit-col if you don’t want several kbd elements to break to a new line.

PressEsc+Nto see an amazing effect.

Snippet

Color Variants

The color variants are modifier classes added to any of the base components listed above.

C Kbd Light

A color modifier on c-kbd to style the kbd element with dark text, light background and border.

Esc+NEsc+N

Snippet

C Kbd Dark

A color modifier on c-kbd to style the kbd element with light text, dark background and border.

Esc+NEsc+N

Snippet

C Kbd Group Light

A color modifier on c-kbd-group, for use with light backgrounds, that sets the text color to \$secondary. This can be used with c-kbd-light and c-kbd-dark.

PressEsc+Nto see an amazing effect.
PressEsc+Nto see an amazing effect.

Snippet

C Kbd Group Dark

A color modifier on c-kbd-group, for use with dark backgrounds, that sets the text color to \$white. This can be used with c-kbd-light and c-kbd-dark.

PressEsc+Nto see an amazing effect.
PressEsc+Nto see an amazing effect.

Snippet

Size Variants

Size variants are modifier classes added to the base component to change the font size.

C Kbd Sm

c-kbd-sm and c-kbd-group-sm are size modifiers that sets font-size: 0.75rem (12px).

Esc+N
Esc+N
PressEsc+Nto see an amazing effect.
PressEsc+Nto see an amazing effect.

Snippet

C Kbd Lg

c-kbd-lg and c-kbd-group-lg are size modifiers that sets font-size: 1rem (16px).

Esc+N
Esc+N
PressEsc+Nto see an amazing effect.
PressEsc+Nto see an amazing effect.

Snippet

Unicode Character List

Standard 0-255 (UTF-8) Character Set

! # $ % & ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ · ¸ ¹ º » ¼ ½ ¾ ¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô õ ö ÷ ø ù ú û ü ý þ ÿ

General Punctuation (U+2000 to U+206F)

Superscripts and Subscripts (U+2070 to U+209F)

Currency Symbols (U+20A0 to U+20CF)

Letterlike Symbols (U+2100 to U+214F)

Greek Characters (U+0391 to U+03C9)

Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ ΢ Σ Τ Υ Φ Χ Ψ Ω Ϊ Ϋ ά έ ή ί ΰ α β γ δ ε ζ η θ ι κ λ μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω

Number Forms (U+2150 to U+218F)

Arrows (U+2190 to U+21FF)

Supplemental Arrows - A (U+27F0 to U+27FF)

Supplemental Arrows - B (U+2900 to U+297F)

⤿ ⥿

Mathematical Operators (U+2200 to U+22FF)

Edit this page on GitHub

Contributors

Matuzalém Teles

Last edited May 9, 2025 at 6:15:38 AM