Skip to content
Book a call
UI Design

Command palettes and keyboard-first SaaS

Power users want speed. How to design a command palette, shortcuts and search ranking, and make them accessible and discoverable.

MD Rakib Shekh7 min read
Cover illustration for the article "Command palettes and keyboard-first SaaS"

Press a key combination in some apps and a small box appears. Type a few letters, press Enter, and you are on the page you wanted, or the action is done. No menus, no hunting.

That box is a command palette. For people who use a product every day, it can be the fastest way to get things done. For everyone else it can be a puzzle. Here is how we decide whether a product needs one, and how we design it well.

When you need a palette

A command palette is not a feature to add because other apps have it. It helps in particular conditions.

It tends to be worth it when:

  • Users spend hours a day in the product. Support tools, project trackers, developer tools, finance and operations software.
  • The product has many places and actions. If there are dozens of screens, settings and commands, menus get deep.
  • Your users are keyboard-comfortable. Developers, analysts, power users.
  • People often know what they want by name. "Go to invoices", "Create a task", "Switch workspace".

It is probably not worth it when the product has few screens, is used once a month, or serves people who rarely use shortcuts. A palette there is extra surface to build and maintain, with few users.

A palette is also not a replacement for good navigation. New users need visible menus and labels. Treat the palette as a fast lane on top of the normal road, not as the only road.

Ask first: what do our heaviest users do again and again, and how many clicks does it take? If the honest answer is "too many", a palette is a good candidate.

What to put in it

A palette that only jumps to pages is a start. A great one lets people do things.

Useful groups of items:

  • Navigation. Go to any main page, setting or recent item.
  • Actions. Create a record, invite a teammate, export, change status, toggle a setting.
  • Search results. Find a customer, ticket, file or project by name, directly from the box.
  • Recent items. Show what the user opened lately when the box is empty.
  • Context actions. When the user is on an invoice, show invoice actions first.
  • Help. Search the help center, or show the shortcut list.

Some design guidance:

  1. Start with empty-state value. When the palette opens with nothing typed, show recent items and a few suggested actions, not a blank box.
  2. Group and label results. "Pages", "Actions" and "Customers" as small headings make long lists scannable.
  3. Use clear, verb-first names for actions. "Create invoice", "Archive project", not "Invoice creation".
  4. Allow multi-step commands. "Assign to…" can open a second step that lists people, then confirms. Keep it to two or three steps.
  5. Be careful with risky actions. Deleting or sending should ask for confirmation, even from the palette. Speed should not mean accidents.
  6. Respect permissions. Only show commands the user is allowed to run.

Shortcuts and hints

A palette is better with shortcuts, and shortcuts are better with a palette. Each can teach the other.

  • Pick a standard way to open it. Many apps use Cmd+K on Mac and Ctrl+K on Windows and Linux. Some use Cmd+Shift+P, borrowed from code editors. Choose one that does not clash with browser or system shortcuts, and tell users.
  • Show shortcuts next to commands. In the result row, display the key combination on the right. Each time someone uses the palette, they see a faster way. This is how people graduate from the palette to shortcuts.
  • Be consistent. Keep a logical pattern. If "G then I" goes to Invoices, "G then C" should go to Customers.
  • Avoid clashing with the browser and screen readers. Many single-letter shortcuts conflict with assistive technology. Let users turn them off or remap them.
  • Offer a cheat sheet. A "?" key or a menu item opening a searchable list of shortcuts.
  • Make it findable. A small hint in the interface, such as a search field that says "Search or run a command (Ctrl K)". Many users will never learn a palette exists if nothing points to it.
  • Introduce it gently. A one-time tip after a user has clicked through menus a few times can work. Do not block them with a tour.

Show the shortcut in the user's platform notation: ⌘ for Mac, Ctrl for others.

Search ranking

The palette is only as good as its results. A user types three letters and expects the right thing at the top.

  • Use fuzzy matching. People mistype and abbreviate. "inv" and "invc" should find "Invoices". Match in the middle of words, too.
  • Rank by relevance and by use. Exact and prefix matches first. Then items the user chooses often and has used recently. Over time the palette learns their habits.
  • Weigh by type. If someone types "new", they probably want an action. If they type a name, they probably want a record. Use that to order groups.
  • Keep results stable. Do not let the list reshuffle as new results arrive. If a search is slow, show local results first, then add the rest below without moving what the user is about to select.
  • Highlight the match. Bold the letters that matched, so users see why a result appeared.
  • Handle no results. Say so, and suggest what to try: a broader search, or searching the help center.
  • Allow keyboard navigation. Up and down arrows to move, Enter to choose, Esc to close, and the first result selected by default so Enter works right away.
  • Be fast. The palette should open instantly and update on each keystroke. If it lags, power users will stop using it.

Look at what people actually type. Logs of searches with no result and of items that were never chosen tell you what is missing or badly named.

Accessibility

A command palette is a keyboard feature by nature, so it can be very friendly to keyboard users. But it needs care to work with a screen reader.

  • Use the right pattern. A palette is usually a modal dialog with a search field and a list of options. The W3C's ARIA Authoring Practices Guide describes the combobox pattern and the modal dialog pattern. Both are worth reading before you build.
  • Manage focus. When the palette opens, focus moves to the input. When it closes, focus returns to where it was.
  • Announce the list. Screen readers should hear how many results there are and which one is selected, as the user moves through them.
  • Label everything. The input has a label, groups have names, and icon-only items have text.
  • Do not trap people. Esc always closes. Tab behavior is predictable.
  • Do not rely on color. The selected item needs a clear visual cue beyond a faint tint, with enough contrast.
  • Respect reduced motion. Keep animations short, and skip them when the user prefers that.
  • Test with real tools. Try it with VoiceOver, NVDA and the keyboard alone.

Remember that the palette is an addition. Everything in it should also be available through normal, accessible navigation.

Mobile fallbacks

Keyboard shortcuts do not exist on most phones, but the idea of fast search and commands still does.

  • Offer a search entry point. A search icon or bar at the top that opens the same list of results and actions, full screen.
  • Use touch-friendly rows. Large targets, clear labels, and no dependence on hover.
  • Hide shortcut hints on touch devices. They only add noise.
  • Keep the keyboard in mind. On a phone, the on-screen keyboard covers half the screen. Keep the input and the first results visible above it.
  • Support external keyboards on tablets. Many people use them with iPads.
  • Prioritize. On mobile, put the few most-used actions first. A long command list is harder to scan on a small screen.

We design dense, keyboard-friendly interfaces for SaaS teams, and some of the tools we build ourselves in the Lab have the same needs. If you are not sure whether a palette suits your product, send us a flow or two and ask for a free design review at /contact.

Want a second pair of eyes on your product?

Send your site or app and get a free design review from Rakib. No sales call, no cost.