Miss. Train. Move.

Header

Modals, confirms. Rises to meet it and lands.

End the match?

The score is saved and the table updates for everyone.

Sport
Football
Move
Rises to meet it and lands.
For
Modals, confirms

rises 560ms settle · backdrop dims · modals, confirms

01 Install

Terminal
npx shadcn@latest add https://moveui-red.vercel.app/r/header.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/header.css";

const ref = useRef<HTMLDialogElement>(null);

<button onClick={() => ref.current?.showModal()}>Delete team</button>
<dialog ref={ref} className="ml-header">
  <p>Delete North FC?</p>
  <button onClick={() => ref.current?.close()}>Cancel</button>
</dialog>

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 "Header" piece to this project. It's for: Modals, confirms.

1. Install it: npx shadcn@latest add https://moveui-red.vercel.app/r/header.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/header.css";

const ref = useRef<HTMLDialogElement>(null);

<button onClick={() => ref.current?.showModal()}>Delete team</button>
<dialog ref={ref} className="ml-header">
  <p>Delete North FC?</p>
  <button onClick={() => ref.current?.close()}>Cancel</button>
</dialog>

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/header

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/header.css
/*
  Header: the dialog rises into place and lands, the page behind dims. For modals and confirms.
  Use on a native <dialog> opened with showModal(). Enter: --ml-dur-travel with --ml-ease-settle.
  Exit: --ml-dur-exit, drops back without a bounce. The backdrop fades on --ml-dur-base.
  Reduced motion: opacity only.
*/
.ml-header {
  --_from: translateY(24px) scale(0.97);
  opacity: 0;
  transform: var(--_from);
  transition:
    opacity var(--ml-dur-exit) var(--ml-ease-out),
    transform var(--ml-dur-exit) var(--ml-ease-out),
    overlay var(--ml-dur-exit) allow-discrete,
    display var(--ml-dur-exit) allow-discrete;
}
/* Keeps the native centring even under CSS resets (Tailwind sets margin: 0 on everything). */
dialog.ml-header { margin: auto; }
.ml-header[open] {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--ml-dur-quick) var(--ml-ease-out),
    transform var(--ml-dur-travel) var(--ml-ease-settle),
    overlay var(--ml-dur-travel) allow-discrete,
    display var(--ml-dur-travel) allow-discrete;
}
@starting-style {
  .ml-header[open] { opacity: 0; transform: var(--_from); }
}
.ml-header::backdrop {
  background: oklch(0.2 0 0 / 0);
  transition:
    background-color var(--ml-dur-exit) var(--ml-ease-out),
    overlay var(--ml-dur-exit) allow-discrete,
    display var(--ml-dur-exit) allow-discrete;
}
.ml-header[open]::backdrop {
  background: oklch(0.2 0 0 / 0.4);
  transition-duration: var(--ml-dur-base);
}
@starting-style {
  .ml-header[open]::backdrop { background: oklch(0.2 0 0 / 0); }
}
@media (prefers-reduced-motion: reduce) {
  .ml-header { --_from: none; }
}