ContextMenu
Since 0.1.0-alpha.22IzzyBlazor.ContextMenu in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly
and its doc comments.
Properties (6)
Forstring requiredThe element whose right-click, long press, menu key or Shift+F10 opens the menu: its id, or a CSS selector when it starts with #, . or [, such as .file-card for every card of a list.
Labelstring requiredThe menu's name for screen readers, such as "Folder actions".
PanelWidthLength? (computed)The width of the menu panel, such as Length.Rem(16) for a column of long labels. Defaults to the content's width, at least 10rem and the trigger's width, up to 24rem. Never wider than the screen.
ChildContentRenderFragment?The MenuItems, MenuGroups and MenuDividers.
@bind-Openbool = falseWhether it is open. Use @bind-Open to follow changes on interactive pages.
Idstring?The element id. Generated when not set.
Plus 17 item props and 4 common props.
Show them hereEvents (1)
OnOpenEventCallback<string>Runs when the menu opens on an interactive page, with the data-menu-value of the element pressed, for items that run C#. On any page, {0} in an item's Value or Href is that value. A menu that uses either opens only in an element that has one.
Parts (5)
Components written inside ContextMenu, documented here with it.
Types (2)
Accent
classThe color of a control: buttons, badges, tags, banners, progress bars and menu items. Primary, Neutral and Danger are the roles; emphasis comes from the variant (solid, soft, outline, ghost, link), not from more colors. For one control in another color, use Of (any CSS color) or Token (a theme token); text on it is chosen for contrast.
| Member | Description |
|---|---|
Primary | The brand color, for the main action. |
Neutral | A quiet, gray action. |
Danger | A destructive action, such as Delete. |
Of(string css) | Any CSS color, such as |
Token(string name) | A theme token, such as |
From(Color color) | A |
Length
structA width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.
| Member | Description |
|---|---|
Sm | 640px (matches the |
Md | 768px (matches the |
Lg | 1024px (matches the |
Xl | 1280px (matches the |
Prose | A comfortable reading width, 68 characters. |
Full | 100% of the containing block. |
Auto |
|
FitContent |
|
MinContent |
|
MaxContent |
|
Px(double value) | Pixels. |
Rem(double value) | Root ems (16px each by default). |
Percent(double value) | Percent of the containing block. |
Ch(double value) | Character widths, for text measures. |
Vw(double value) | Percent of the viewport width. |
Dvh(double value) | Percent of the dynamic viewport height (accounts for mobile browser bars). |
Of(string css) | Any CSS length, such as |
Css string | The CSS value this length renders as. |