popover.menu
A short list of commands or links that opens from a button: more actions, an account menu. Closes when one is pressed. The Popover places it beside its button, so do not position it with className
Read https://www.prongs.dev/docs/intents/popover/menu.md and tell me whether popover.menu fits what I am building.Popover intents
Example
<Popover intent="popover.menu" label="Project actions"
trigger={<Action intent="action.reveal" icon={<MoreHorizontal />} label="More actions" />}>
<Action intent="action.command" verb="rename" onClick={rename}>Rename</Action>
<Action intent="action.delete" onClick={remove}>Delete</Action>
</Popover>Connections
Choosing between neighbours
If it is
Use
A short list of commands or links that opens from a button: more actions, an account menu. Closes when one is pressed. The Popover places it beside its button, so do not position it with className
popover.menuChoosing a value for a setting
popover.pickerA task that needs the user’s full attention
dialog.taskCommands that do something
rather thanpopover.pickerpopover.menuAnything the user acts on
rather thanpopover.infopopover.menu
For registry authors
Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.
What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.
How popover.menu resolves, and its definition
Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.
surface.floatingFloats next to the element that opened it, flipping to stay on screen. Hidden while closed, whatever display the intent sets
surface-overlay m-1 inset-auto rounded-lg border border-surface-border shadow-lg [position-area:bottom_span-right] [position-try-fallbacks:flip-block,flip-inline] origin-top-left data-[align=end]:origin-top-right data-[align=end]:[position-area:bottom_span-left] transition-[opacity,scale,display,overlay] transition-discrete duration-150 ease-out [&:not(:popover-open)]:hidden [&:not(:popover-open)]:scale-95 [&:not(:popover-open)]:opacity-0 starting:[&:popover-open]:scale-95 starting:[&:popover-open]:opacity-0 motion-reduce:transition-none
arrange.rowsIts buttons and links become full-width rows, whatever their own look, keeping a danger colour; a pressed or selected one is filled and ticked
flex flex-col [&_:is(a,button)]:flex [&_:is(a,button)]:w-full [&_:is(a,button)]:items-center [&_:is(a,button)]:justify-start [&_:is(a,button)]:gap-2.5 [&_:is(a,button)]:text-left [&_:is(a,button)]:rounded-md [&_:is(a,button)]:border-0 [&_:is(a,button)]:bg-transparent [&_:is(a,button)]:px-3 [&_:is(a,button)]:py-1.5 [&_:is(a,button)]:font-normal [&_:is(a,button)]:text-[var(--row-fg,var(--foreground))] [&_:is(a,button)]:no-underline [&_:is(a,button):hover]:no-underline [&_:is(a,button):hover]:bg-surface-hover [&_:is(a,button):focus-visible]:bg-surface-hover [&_button[aria-pressed=true]]:bg-surface-active [&_button[aria-pressed=true]]:font-medium [&_button[aria-pressed=true]]:text-foreground [&_button[aria-pressed=true]]:after:ml-auto [&_button[aria-pressed=true]]:after:content-["✓"] [&_button[aria-selected=true]]:bg-surface-active [&_button[aria-selected=true]]:font-medium [&_button[aria-selected=true]]:text-foreground [&_button[aria-selected=true]]:after:ml-auto [&_button[aria-selected=true]]:after:content-["✓"]
popover.menuA short list of commands or links that opens from a button: more actions, an account menu. Closes when one is pressed. The Popover places it beside its button, so do not position it with className
min-w-48 gap-0.5 p-1
surface-overlay m-1 inset-auto rounded-lg border border-surface-border shadow-lg [position-area:bottom_span-right] [position-try-fallbacks:flip-block,flip-inline] origin-top-left data-[align=end]:origin-top-right data-[align=end]:[position-area:bottom_span-left] transition-[opacity,scale,display,overlay] transition-discrete duration-150 ease-out [&:not(:popover-open)]:hidden [&:not(:popover-open)]:scale-95 [&:not(:popover-open)]:opacity-0 starting:[&:popover-open]:scale-95 starting:[&:popover-open]:opacity-0 motion-reduce:transition-none flex flex-col [&_:is(a,button)]:flex [&_:is(a,button)]:w-full [&_:is(a,button)]:items-center [&_:is(a,button)]:justify-start [&_:is(a,button)]:gap-2.5 [&_:is(a,button)]:text-left [&_:is(a,button)]:rounded-md [&_:is(a,button)]:border-0 [&_:is(a,button)]:bg-transparent [&_:is(a,button)]:px-3 [&_:is(a,button)]:py-1.5 [&_:is(a,button)]:font-normal [&_:is(a,button)]:text-[var(--row-fg,var(--foreground))] [&_:is(a,button)]:no-underline [&_:is(a,button):hover]:no-underline [&_:is(a,button):hover]:bg-surface-hover [&_:is(a,button):focus-visible]:bg-surface-hover [&_button[aria-pressed=true]]:bg-surface-active [&_button[aria-pressed=true]]:font-medium [&_button[aria-pressed=true]]:text-foreground [&_button[aria-pressed=true]]:after:ml-auto [&_button[aria-pressed=true]]:after:content-["✓"] [&_button[aria-selected=true]]:bg-surface-active [&_button[aria-selected=true]]:font-medium [&_button[aria-selected=true]]:text-foreground [&_button[aria-selected=true]]:after:ml-auto [&_button[aria-selected=true]]:after:content-["✓"] min-w-48 gap-0.5 p-1
'popover.menu': {
kind: 'semantic',
description: 'A short list of commands or links that opens from a button: more actions, an account menu. Closes when one is pressed. The Popover places it beside its button, so do not position it with className',
refs: ['surface.floating', 'arrange.rows'],
binding: { classes: 'min-w-48 gap-0.5 p-1' },
notFor: [
{ context: 'choosing a value for a setting', instead: 'popover.picker' },
{
context: 'a task that needs the user’s full attention',
instead: 'dialog.task',
},
],
},