Skip to content
IzzyBlazor

Enter all results ↑ ↓ move Esc close

ContextMenu

Since 0.1.0-alpha.22
Opens a menu at the pointer by right-click, with no button.

IzzyBlazor.ContextMenu in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.31 assembly and its doc comments.

Properties (6)

Forstring requiredAdded in 0.1.0-alpha.22

The 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 requiredAdded in 0.1.0-alpha.22

The menu's name for screen readers, such as "Folder actions".

PanelWidthLength? (computed)Added in 0.1.0-alpha.22

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?Added in 0.1.0-alpha.22
@bind-Openbool = falseAdded in 0.1.0-alpha.22 @bind: Interactive only

Whether it is open. Use @bind-Open to follow changes on interactive pages.

Idstring?Added in 0.1.0-alpha.22

The element id. Generated when not set.

Events (1)

OnOpenEventCallback<string>Added in 0.1.0-alpha.24Interactive only

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

class

The 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.

Accent members
MemberDescription
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 "#0d9488". Text on it is black or white, whichever reads better.

Token(string name)

A theme token, such as "brand" for --ib-color-brand; text on it uses --ib-color-on-brand when the theme defines it.

From(Color color)

A Color as an accent, such as Color.Success.

Length

struct

A width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.

Length members
MemberDescription
Sm

640px (matches the sm breakpoint).

Md

768px (matches the md breakpoint).

Lg

1024px (matches the lg breakpoint).

Xl

1280px (matches the xl breakpoint).

Prose

A comfortable reading width, 68 characters.

Full

100% of the containing block.

Auto

auto.

FitContent

fit-content: as wide as the content, up to the available space.

MinContent

min-content.

MaxContent

max-content.

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 calc(100% - 2rem). Checked for unsafe characters.

Css string

The CSS value this length renders as.

Connection lost

Rejoining the server…