Context menu

The menu that appears where you clicked, anchored to its own corner.

0:00 / 0:01

Customize

0.42
0.3
12

Installation

pnpm odori add component context-menu

Edit the source in videos/components/context-menu/. Use odori diff to compare upstream changes and odori update to apply updates.

Timing contract

Use these durations and content limits when composing a scene. Run odori test to check your video.

Family
Interface
Recommended duration
120 frames · 4s
Minimum duration
48 frames · 1.6s
Entrance
24 frames
Exit
10 frames
Reduced motion
the menu appears without scaling from its corner
Requires
sans font
Content limits
items ≤ 6, label ≤ 24

Props

PropTypeDefaultRequired
childrenThe surface the menu opens over.ReactNode——
itemsContextMenuItem[]—Yes
xWhere the menu's corner sits, as a fraction of the frame.number0.42—
ynumber0.3—
openAtFrame the menu opens on.number12—
chooseAtFrame an item is chosen. Counts from the top, zero based.number——
chosenWhich item is chosen.number0—

Related components

All components