Miss. Train. Move.

Huddle

Menus, command palettes. The team gathers, then takes positions one by one.

Sport
American football
Move
The team gathers, then takes positions one by one.
For
Menus, command palettes

items 30ms apart · leave together · menus, palettes

01 Install

Terminal
npx shadcn@latest add https://moveui-red.vercel.app/r/huddle.json

It brings the tokens with it. The first time, import the tokens once in your root layout:

app/layout.tsx
import "@/components/moveui/tokens.css";

Not using shadcn? Copy the files below into components/moveui/, and tokens.css next to them.

02 Use it

Example
import "@/components/moveui/surfaces/huddle.css";

// Each item gets its index as --i, so they come in one after another.
<button popoverTarget="menu">Menu</button>
<div id="menu" popover="auto" className="ml-huddle">
  {["Profile", "Squad", "Sign out"].map((item, i) => (
    <button key={item} style={{ "--i": i } as React.CSSProperties}>{item}</button>
  ))}
</div>

03 Or ask your agent

Paste this into Claude Code, Cursor or any coding agent. It installs the piece and wires it in.

Prompt
Add the Move UI "Huddle" piece to this project. It's for: Menus, command palettes.

1. Install it: npx shadcn@latest add https://moveui-red.vercel.app/r/huddle.json
2. If the project doesn't import the Move UI tokens yet, add this once to the root layout: import "@/components/moveui/tokens.css";
3. Use it like this, adapted to where it belongs in my code:

import "@/components/moveui/surfaces/huddle.css";

// Each item gets its index as --i, so they come in one after another.
<button popoverTarget="menu">Menu</button>
<div id="menu" popover="auto" className="ml-huddle">
  {["Profile", "Squad", "Sign out"].map((item, i) => (
    <button key={item} style={{ "--i": i } as React.CSSProperties}>{item}</button>
  ))}
</div>

Keep its reduced-motion behaviour and keyboard support. Don't hardcode durations, easing or colours: they come from the --ml-* tokens.
Docs: https://moveui-red.vercel.app/pieces/huddle

Want your agent to know the whole library and its motion rules? Add the Move UI skill to your project:

Terminal
npx shadcn@latest add https://moveui-red.vercel.app/r/skill.json

04 Code

components/moveui/surfaces/huddle.css
/*
  Huddle: the menu opens and its items come in one after another, like a team taking positions.
  For menus and command palettes. Items need --i (0, 1, 2...) in their style.
  Enter: the surface fades in on --ml-dur-quick, each item rises on --ml-dur-base with --ml-ease-settle,
  --ml-stagger apart. Exit: everything leaves together on --ml-dur-exit, no stagger.
  Works on a native [popover] or [data-open]. Reduced motion: opacity only, no stagger.
*/
.ml-huddle {
  opacity: 0;
  transition:
    opacity var(--ml-dur-exit) var(--ml-ease-out),
    overlay var(--ml-dur-exit) allow-discrete,
    display var(--ml-dur-exit) allow-discrete;
}
.ml-huddle > * {
  --_from: translateY(-6px);
  opacity: 0;
  transform: var(--_from);
  transition:
    opacity var(--ml-dur-exit) var(--ml-ease-out),
    transform var(--ml-dur-exit) var(--ml-ease-out);
}
.ml-huddle:popover-open,
.ml-huddle[data-open] {
  opacity: 1;
  transition:
    opacity var(--ml-dur-quick) var(--ml-ease-out),
    overlay var(--ml-dur-base) allow-discrete,
    display var(--ml-dur-base) allow-discrete;
}
.ml-huddle:popover-open > *,
.ml-huddle[data-open] > * {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--ml-dur-quick) var(--ml-ease-out) calc(var(--i, 0) * var(--ml-stagger)),
    transform var(--ml-dur-base) var(--ml-ease-settle) calc(var(--i, 0) * var(--ml-stagger));
}
@starting-style {
  .ml-huddle:popover-open,
  .ml-huddle[data-open] { opacity: 0; }
  .ml-huddle:popover-open > *,
  .ml-huddle[data-open] > * { opacity: 0; transform: var(--_from); }
}
@media (prefers-reduced-motion: reduce) {
  .ml-huddle > * { --_from: none; }
}