Command palette
Cmd+K menu · Command bar · Command menu · Quick switcher · Paleta de comandos · Barra dei comandi
A small search window that opens in the centre of the screen with Cmd or Ctrl+K, reaching any command by typing a few letters. Born in code editors, since 2018 it has become a staple of productivity apps for keyboard-first users.
- Era
- 2018 – today
- Use
- Mainstream
Live demo
View code
<div class="app">
<aside><i class="dot"></i><span></span><span></span><span class="on"></span><span></span><span></span></aside>
<main><h3></h3><p></p><p></p><p class="s"></p><p></p><p class="s"></p></main>
<div class="kc"><kbd>⌘</kbd><kbd class="k">K</kbd></div>
<div class="dim"></div>
<div class="pal">
<div class="in"><svg viewBox="0 0 24 24"><circle cx="11" cy="11" r="7"/><path d="M20 20l-4-4"/></svg><span class="ph">Cerca un comando…</span><span class="ty"><b class="c1">n</b><b class="c2">u</b><b class="c3">o</b></span><i class="caret"></i><kbd class="esc">esc</kbd></div>
<div class="lists">
<i class="sel"></i>
<ul class="la"><li class="h">Suggeriti</li><li><em>↗</em><span>Vai alla bacheca</span><kbd>G B</kbd></li><li><em>⚙</em><span>Impostazioni</span><kbd>⌘ ,</kbd></li><li><em>◐</em><span>Cambia tema</span><kbd>⌘ T</kbd></li><li><em>?</em><span>Scorciatoie</span><kbd>?</kbd></li></ul>
<ul class="lb"><li class="h">Azioni</li><li><em>+</em><span><u>Nuo</u>vo documento</span><kbd>⌘ N</kbd></li><li><em>▢</em><span><u>Nuo</u>va cartella</span><kbd>⇧ ⌘ N</kbd></li><li><em>◇</em><span><u>Nuo</u>vo progetto</span><kbd>⌥ ⌘ N</kbd></li><li><em>↻</em><span>Ap<u>r</u>i n<u>uo</u>va finestra</span><kbd>⌘ ⇧ W</kbd></li></ul>
</div>
<div class="ft"><span><kbd>↑</kbd><kbd>↓</kbd> naviga</span><span><kbd>↵</kbd> apri</span><span>4 risultati</span></div>
</div>
<div class="toast">✓ Cartella creata</div>
</div> body{background:#0B0B0F;display:grid;place-items:center;overflow:hidden;font-family:Inter,sans-serif;color:#FAFAFA}
.app{position:relative;width:500px;max-width:94vw;height:276px;border-radius:14px;overflow:hidden;background:#111114;border:1px solid #27272A;display:flex}
aside{width:96px;background:#0e0e11;border-right:1px solid #27272A;padding:14px 12px;display:flex;flex-direction:column;gap:10px}
aside .dot{width:18px;height:18px;border-radius:6px;background:#7C5CFF;margin-bottom:6px}
aside span{height:8px;border-radius:4px;background:#27272A}aside span.on{background:#3f3f46}
main{flex:1;padding:22px 26px;display:flex;flex-direction:column;gap:11px}
main h3{margin:0 0 6px;height:16px;width:46%;border-radius:5px;background:#3f3f46}
main p{margin:0;height:8px;border-radius:4px;background:#27272A}main p.s{width:62%}
.kc{position:absolute;right:14px;top:12px;display:flex;gap:4px;z-index:3}
kbd{font:500 10px 'JetBrains Mono',monospace;color:#A1A1AA;background:#27272A;border:1px solid #3f3f46;border-bottom-width:2px;border-radius:5px;padding:1px 5px}
.kc kbd{font-size:13px;padding:3px 8px;color:#FAFAFA}
.dim{position:absolute;inset:0;background:#0B0B0Fb8;backdrop-filter:blur(2px)}
.pal{position:absolute;left:50%;top:26px;width:350px;max-width:84%;margin-left:-175px;background:#18181B;border:1px solid #2f2f35;border-radius:14px;box-shadow:0 24px 60px #000c,0 0 0 1px #000;overflow:hidden}
.in{display:flex;align-items:center;gap:9px;padding:12px 14px;border-bottom:1px solid #27272A;font-size:15px;position:relative}
.in svg{width:17px;height:17px;fill:none;stroke:#A1A1AA;stroke-width:2;stroke-linecap:round}
.ph{color:#71717a;position:absolute;left:46px}
.ty b{font-weight:500;opacity:0}
.caret{width:1.5px;height:18px;background:#7C5CFF}
.esc{margin-left:auto}
.lists{position:relative;height:150px;padding:4px 6px}
ul{list-style:none;margin:0;padding:0;position:absolute;inset:4px 6px}
li{display:flex;align-items:center;gap:10px;height:28px;padding:0 10px;font-size:13px;color:#d4d4d8;position:relative}
li.h{height:24px;font-size:10px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:#71717a}
li em{font-style:normal;width:18px;height:18px;display:grid;place-items:center;border-radius:5px;background:#27272A;font-size:11px;color:#A1A1AA}
li kbd{margin-left:auto}
u{text-decoration:none;color:#c4b5fd;font-weight:600}
.lb{opacity:0}
.sel{position:absolute;left:6px;right:6px;top:28px;height:28px;border-radius:8px;background:#7C5CFF2e;box-shadow:inset 2px 0 0 #7C5CFF}
.ft{display:flex;gap:16px;padding:8px 14px;border-top:1px solid #27272A;font-size:11px;color:#71717a}.ft span:last-child{margin-left:auto}
.ft kbd{margin-right:2px}
.toast{position:absolute;left:50%;bottom:16px;transform:translateX(-50%);background:#FAFAFA;color:#0B0B0F;font-size:12px;font-weight:600;padding:7px 14px;border-radius:99px;opacity:0;box-shadow:0 8px 20px #0008}
@media (prefers-reduced-motion:no-preference){
.pal,.dim{animation:op 7s cubic-bezier(.16,1,.3,1) infinite}
.k{animation:press 7s infinite}
.ph{animation:ph 7s steps(1) infinite}
.c1{animation:c1 7s steps(1) infinite}.c2{animation:c2 7s steps(1) infinite}.c3{animation:c3 7s steps(1) infinite}
.caret{animation:blink 1s steps(1) infinite}
.la{animation:la 7s steps(1) infinite}.lb{animation:lb 7s steps(1) infinite}
.sel{animation:sel 7s cubic-bezier(.16,1,.3,1) infinite}
.toast{animation:toast 7s ease-out infinite}
.pal,.dim,.k,.ph,.c1,.c2,.c3,.la,.lb,.sel,.toast{animation-delay:-2.6s}
}
@keyframes op{0%,6%{opacity:0;transform:scale(.96)}9%,80%{opacity:1;transform:scale(1)}84%,100%{opacity:0;transform:scale(.98)}}
@keyframes press{0%,3%{transform:none;background:#27272A}4%,7%{transform:translateY(2px);background:#7C5CFF;border-bottom-width:1px}8%,100%{transform:none;background:#27272A}}
@keyframes ph{0%{opacity:1}24%{opacity:0}}
@keyframes c1{0%{opacity:0}24%{opacity:1}}
@keyframes c2{0%{opacity:0}29%{opacity:1}}
@keyframes c3{0%{opacity:0}34%{opacity:1}}
@keyframes blink{50%{opacity:0}}
@keyframes la{0%{opacity:1}24%{opacity:0}}
@keyframes lb{0%{opacity:0}24%{opacity:1}}
@keyframes sel{0%,44%{transform:translateY(0)}48%,56%{transform:translateY(28px)}60%,100%{transform:translateY(28px)}66%{background:#7C5CFF55}72%{background:#7C5CFF2e}}
@keyframes toast{0%,80%{opacity:0;transform:translate(-50%,10px)}84%,96%{opacity:1;transform:translate(-50%,0)}100%{opacity:0;transform:translate(-50%,0)}} Characteristics
- Centred modal over a dimmed background
- Large search field with blinking caret
- Results filtered as you type with matched letters highlighted
- Keyboard shortcut chips on the right
- Selected row moved with the arrow keys
Palette
Click a swatch to copy it
Typography
Headings · Inter Command palette
Body · JetBrains Mono A small search window that opens in the centre of the screen with Cmd or Ctrl+K, reaching any command by typing a few letters. Born in code editors, since 2018 it has become a staple of productivity apps for keyboard-first users.
Motion
- Easing
cubic-bezier(.16,1,.3,1)- Typical duration
- 120–200 ms apertura, risultati istantanei
- Techniques
- scale da 0.96 a 1 con opacity all'apertura, ricerca fuzzy sul testo digitato, translateY della riga selezionata, scorciatoie globali da tastiera, focus trap e chiusura con Esc
Accessibility (reduced motion)
Open and close the window with no scale or fade and move the selection instantly.
Prompt for your agent
Copy and paste into your prompt to have an agent or image generator reproduce this style.
For web pages and UI
Design the web page or interface in this style: Command palette (Cmd+K menu, Command bar). A small search window that opens in the centre of the screen with Cmd or Ctrl+K, reaching any command by typing a few letters. Born in code editors, since 2018 it has become a staple of productivity apps for keyboard-first users. Characteristics: Centred modal over a dimmed background, Large search field with blinking caret, Results filtered as you type with matched letters highlighted, Keyboard shortcut chips on the right, Selected row moved with the arrow keys. Palette: #0B0B0F, #18181B, #27272A, #A1A1AA, #FAFAFA, #7C5CFF. Typography: headings in Inter, body text in JetBrains Mono (Google Fonts or equivalents). Mood: rational, clean, subtle. Motion: easing cubic-bezier(.16,1,.3,1), typical duration 120–200 ms apertura, risultati istantanei; techniques: scale da 0.96 a 1 con opacity all'apertura, ricerca fuzzy sul testo digitato, translateY della riga selezionata, scorciatoie globali da tastiera, focus trap e chiusura con Esc. With prefers-reduced-motion: Open and close the window with no scale or fade and move the selection instantly. References: Tavolozza dei comandi degli editor di codice (2014-2015), lanciatori da tastiera dei sistemi operativi, menu Cmd+K delle app di produttività (2018-2020), componenti open source di command menu (2022).
For images
Create the image in this visual style: Command palette (Cmd+K menu, Command bar). A small search window that opens in the centre of the screen with Cmd or Ctrl+K, reaching any command by typing a few letters. Born in code editors, since 2018 it has become a staple of productivity apps for keyboard-first users. Characteristics: Centred modal over a dimmed background, Large search field with blinking caret, Results filtered as you type with matched letters highlighted, Keyboard shortcut chips on the right, Selected row moved with the arrow keys. Keywords: dark productivity app interface, centred rounded command palette modal with soft shadow over a dimmed blurred workspace, large search field at top with a blinking caret, list of five result rows with small line icons, one row highlighted in violet, small grey keyboard shortcut chips aligned right, thin footer with key hints, crisp flat vector UI. Palette: #0B0B0F, #18181B, #27272A, #A1A1AA, #FAFAFA, #7C5CFF. Mood: rational, clean, subtle. Avoid: light skeuomorphic textures, cluttered toolbars, logos, brand names, photographic background.
Relations
Derives from
Similar to
Contrasts with
References
- Tavolozza dei comandi degli editor di codice (2014-2015)
- lanciatori da tastiera dei sistemi operativi
- menu Cmd+K delle app di produttività (2018-2020)
- componenti open source di command menu (2022)