Skip to content

Quick Action

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

Command PaletteHTMLCSSany framework

Copy into your project

HTML
<!-- Quick Action — primary action button with kbd shortcut -->
<button class="nuda-quick" type="button">
  <span class="nuda-quick__icon">
    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor"
         stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
      <path d="M13 2 L4 14 L12 14 L11 22 L20 10 L12 10 Z" />
    </svg>
  </span>
  <span class="nuda-quick__label">Run command</span>
  <span class="nuda-quick__kbd"><kbd>⌘</kbd><kbd>↵</kbd></span>
</button>
CSS
/* Quick Action
   Primary palette CTA: gradient bg, lift on hover, shimmer sweep + kbd.
   Customize: --qa-accent */

.nuda-quick {
  --qa-accent: #e4ff54;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  background: linear-gradient(
    180deg,
    rgba(228, 255, 84, 0.12),
    rgba(228, 255, 84, 0.06)
  );
  border: 1px solid rgba(228, 255, 84, 0.25);
  border-radius: 9px;
  color: #fafafa;
  font: 600 0.875rem ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  overflow: hidden;
}

.nuda-quick:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(228, 255, 84, 0.25);
  border-color: var(--qa-accent);
}

.nuda-quick:active { transform: translateY(0) scale(0.98); }

.nuda-quick::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 30%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 70%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.nuda-quick:hover::before { transform: translateX(100%); }

.nuda-quick__icon {
  position: relative;
  z-index: 1;
  width: 16px;
  height: 16px;
  color: var(--qa-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 3px rgba(228, 255, 84, 0.5));
}

.nuda-quick__icon svg { width: 100%; height: 100%; }

.nuda-quick__label,
.nuda-quick__kbd { position: relative; z-index: 1; }

.nuda-quick__kbd {
  display: inline-flex;
  gap: 3px;
  margin-left: 4px;
}

.nuda-quick__kbd kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: rgba(228, 255, 84, 0.15);
  border: 1px solid rgba(228, 255, 84, 0.3);
  border-radius: 4px;
  font: 700 0.7rem ui-monospace, monospace;
  color: var(--qa-accent);
  line-height: 1;
}

How to use Quick Action

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