Skip to content

Group Header

A copy-paste command palette component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

Command PaletteHTMLCSSany framework
Suggestions3
New file
New folder
Open recent

Copy into your project

HTML
<!-- Group Header — section in a command palette -->
<div class="nuda-grouphd">
  <div class="nuda-grouphd__head">
    <span class="nuda-grouphd__title">Suggestions</span>
    <span class="nuda-grouphd__count">3</span>
  </div>
  <div class="nuda-grouphd__row"><span class="nuda-grouphd__dot"></span>New file</div>
  <div class="nuda-grouphd__row"><span class="nuda-grouphd__dot"></span>New folder</div>
  <div class="nuda-grouphd__row"><span class="nuda-grouphd__dot"></span>Open recent</div>
</div>
CSS
/* Group Header
   Section header above a small list inside a command palette.
   Customize: --grp-accent */

.nuda-grouphd {
  --grp-accent: #e4ff54;
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  max-width: 280px;
  padding: 6px;
}

.nuda-grouphd__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 10px;
}

.nuda-grouphd__title {
  font: 700 0.65rem ui-sans-serif, system-ui, sans-serif;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nuda-grouphd__count {
  font: 700 0.65rem ui-monospace, monospace;
  color: #63636e;
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
}

.nuda-grouphd__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  font: 500 0.875rem ui-sans-serif, system-ui, sans-serif;
  color: #a1a1aa;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nuda-grouphd__row:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fafafa;
}

.nuda-grouphd__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #63636e;
  flex-shrink: 0;
  transition: background 0.2s, box-shadow 0.2s;
}

.nuda-grouphd__row:hover .nuda-grouphd__dot {
  background: var(--grp-accent);
  box-shadow: 0 0 4px var(--grp-accent);
}

How to use Group Header

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More command palette components

← Browse all NudaUI components