Pop
Popovers, context menus. The pop-up: grows out of the trigger with a little weight.
Midfield · No. 10
Playmaker
- Passes
- 64
- Chances
- 5
- Km run
- 11.2
- Sport
- Baseball
- Move
- The pop-up: grows out of the trigger with a little weight.
- For
- Popovers, context menus
scale from trigger · in 320ms / out 192ms · popovers
01 Install
npx shadcn@latest add https://moveui-red.vercel.app/r/pop.jsonIt brings the tokens with it. The first time, import the tokens once in your root layout:
import "@/components/moveui/tokens.css";Not using shadcn? Copy the files below into components/moveui/, and tokens.css next to them.
02 Use it
import "@/components/moveui/surfaces/pop.css";
// --ml-origin: the corner nearest the trigger.
<button popoverTarget="share">Share</button>
<div id="share" popover="auto" className="ml-pop" style={{ "--ml-origin": "top left" } as React.CSSProperties}>
Copy link
</div>03 Or ask your agent
Paste this into Claude Code, Cursor or any coding agent. It installs the piece and wires it in.
Add the Move UI "Pop" piece to this project. It's for: Popovers, context menus.
1. Install it: npx shadcn@latest add https://moveui-red.vercel.app/r/pop.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/pop.css";
// --ml-origin: the corner nearest the trigger.
<button popoverTarget="share">Share</button>
<div id="share" popover="auto" className="ml-pop" style={{ "--ml-origin": "top left" } as React.CSSProperties}>
Copy link
</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/popWant your agent to know the whole library and its motion rules? Add the Move UI skill to your project:
npx shadcn@latest add https://moveui-red.vercel.app/r/skill.json04 Code
/*
Pop: the surface grows out of its trigger with a little weight. For popovers and context menus.
Enter: --ml-dur-base with --ml-ease-settle (one small overshoot). Exit: --ml-dur-exit, straight back in.
Works on a native [popover] or [data-open]. --ml-origin = the corner nearest the trigger.
Reduced motion: opacity only.
*/
.ml-pop {
--_from: scale(0.88);
transform-origin: var(--ml-origin, top left);
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;
}
.ml-pop:popover-open,
.ml-pop[data-open] {
opacity: 1;
transform: none;
transition:
opacity var(--ml-dur-tap) var(--ml-ease-out),
transform var(--ml-dur-base) var(--ml-ease-settle),
overlay var(--ml-dur-base) allow-discrete,
display var(--ml-dur-base) allow-discrete;
}
@starting-style {
.ml-pop:popover-open,
.ml-pop[data-open] { opacity: 0; transform: var(--_from); }
}
@media (prefers-reduced-motion: reduce) {
.ml-pop { --_from: none; }
}
