Context Menu

Elementy, podmenu i klawisze rodziny menu, otwierane tam, gdzie są potrzebne: prawym przyciskiem przy wskaźniku, długim przytrzymaniem pod palcem albo klawiszem menu kontekstowego i Shift+F10.

Dostępny w
  • Angular: dostępny
  • Vue: dostępny
  • React: dostępny
  • React Native: dostępny

Użycie

Right-click or long-press here

Import

ts
import {
  SoneContextMenuTriggerDirective,
} from "@surface-one/angular/context-menu";

Dokumentacja API

SoneContextMenuTriggerDirectiveDyrektywa

`[soneContextMenuTrigger]` — the area that opens a `[soneMenu]` where it is asked for (spartan/ui `brnContextMenuTrigger`, Radix ContextMenu): a right click opens it at the pointer, a long press at the finger, and the ContextMenu key or Shift+F10 at the area on its first item. The menu is the menu family's: its items, groups, check / radio items, submenus, Arrow keys, Home / End, typeahead, and it closes on activation, Escape, Tab or a click outside, giving focus back to the area. Make the area focusable (`tabindex="0"`) so the keyboard can reach it.

Selektor
[soneContextMenuTrigger]
Eksport jako
soneContextMenuTrigger
Wejścia
NazwaTyp Domyślnie
side

The side of the trigger the panel opens on; it flips when that side lacks room.

FloatingSide"bottom"
align

Alignment along the trigger's edge.

FloatingAlign"start"
offset

Gap between the trigger and the panel, in px.

number4
opendwukierunkowe

Shown or not — `[(open)]`.

booleanfalse
keepOpenOnOutsideClick

Keep the panel open on a click outside it (Escape still closes it).

booleanfalse
soneMenuTriggerSoneOverlayContent | nullnull
soneContextMenuTriggerSoneOverlayContent | nullnull
disabled

Leave the browser's own context menu alone.

booleanfalse