Key chip
Keyboard keys for showing a shortcut, such as Command K.
⌘
K
Options
Code
import "./key-chip.css";
export function KeyChip({ children }) {
return <kbd className="dh-key">{children}</kbd>;
}.dh-key {
display: inline-grid;
place-items: center;
min-width: 2.2em;
height: 2.2em;
padding: 0 0.5em;
border-radius: 0.5em;
background: var(--dh-raised, #fff);
color: var(--dh-fg, #171717);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 0.9em;
box-shadow: 0 0 0 0.5px var(--dh-edge, #d6d6d2), 0 0.15em 0 var(--dh-edge, #d6d6d2);
}<kbd class="dh-key">⌘</kbd>
<kbd class="dh-key">K</kbd>.dh-key {
display: inline-grid;
place-items: center;
min-width: 2.2em;
height: 2.2em;
padding: 0 0.5em;
border-radius: 0.5em;
background: var(--dh-raised, #fff);
color: var(--dh-fg, #171717);
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
font-size: 0.9em;
box-shadow: 0 0 0 0.5px var(--dh-edge, #d6d6d2), 0 0.15em 0 var(--dh-edge, #d6d6d2);
}Key chip is a Figma component
- Open it in Figma.
- Copy the component (Cmd or Ctrl + C).
- Paste it into your own file.