Dropdown menus that open when right clicking a designated area.
Learn more about the menu component on the dropdown page ->
A wrapper component that enables right-click context menu functionality.
Prop
|
Description
|
---|---|
wire:model |
Binds the context menu's state to a Livewire property. See the wire:model documentation for more information.
|
position |
Controls the position of the menu relative to the click position. Format: [vertical] [horizontal]. Vertical options: top, bottom (default). Horizontal options: start, center, end (default).
|
gap |
Distance in pixels between the menu and the click position. Default: 4.
|
offset |
Additional offset in pixels along both axes. Format: [x] [y].
|
target |
ID of an external element to use as the menu. Use this when you need the menu to be outside the context element's DOM tree.
|
detail |
Custom value to be stored in the menu's data-detail attribute, useful for adding custom styling or behavior based on the source of the context menu.
|
disabled |
Prevents the context menu from being shown when right-clicking.
|
Slot
|
Description
|
---|---|
default |
The first child element functions as the trigger area, which will show the context menu when right-clicked. The second child element should be a flux:menu component that will appear as the context menu.
|