PyBlade/ui
Menu⌄
DocsComponentsContext menu

Context menu

A menu opened with a right click on its area.

Alpine.jsdepends on dropdown-menu1 file

Installation

pyblade-ui add context-menu

Usage

The tag <pb-ui.context-menu> is available in all your templates.

<pb-ui.context-menu>
  <pb-slot:trigger><div class="grid h-36 place-items-center rounded-md border border-dashed">Right click here</div></pb-slot:trigger>
  <pb-ui.dropdown-menu-item>Back</pb-ui.dropdown-menu-item>
  <pb-ui.dropdown-menu-item>Reload</pb-ui.dropdown-menu-item>
</pb-ui.context-menu>

Props

PropDefault
trigger''

Any other attribute (class, id, x-on:click, hx-post…) is passed to the root element; your Tailwind classes win over the component's.