Showcase

Popover

This documentation provides a comprehensive reference for the Popover component, guiding you through its configuration options.
Demos

Screenshot #

Blazor Popover Component

Parameters #

Name Type Default Required Description Added Version
AdditionalAttributes Dictionary<string, object>? null Gets or sets additional attributes that will be applied to the component. 4.1.0
Animation bool True Gets or sets whether the popover fades in and out. The fade also respects the user's reduced-motion setting. 4.1.0
AutoClose bool True Gets or sets whether the popover closes on a click outside it and its trigger, on Escape, and when focus leaves its content. Hover and Focus popovers close on Escape either way. 4.1.0
ChildContent RenderFragment? null Gets or sets the trigger of the popover. Its first interactive element (a link, button, form control, or element with a tabindex) gets the popover. When there is none, or it is disabled, the wrapper around it gets the popover instead, focusable with the Click or Focus trigger; with the Click trigger, Enter and Space open it. 4.1.0
Class string? null Gets or sets the CSS class name(s) to apply to the component. 4.1.0
Color PopoverColor None Gets or sets the color of the popover header and border. 4.1.0
Container string? null Gets or sets the CSS selector of the element the popover is added to, for example a modal's .modal-body so its content can take focus inside the modal. When null, the popover is added to the page body. 4.1.0
Content string? null Gets or sets the content text, always shown as text. ContentTemplate takes precedence. 4.1.0
ContentTemplate RenderFragment? null Gets or sets the content markup, such as formatted text, a table, or buttons. It updates in place while the popover is open. 4.1.0
CustomClass string? null Gets or sets a CSS class added to the popover, for styling it through Bootstrap's popover CSS variables. 4.1.0
Disabled bool False Gets or sets whether the popover is disabled. A disabled popover does not open until it is enabled again, and closes if it is open. 4.1.0
FallbackPlacements IEnumerable<PopoverPlacement>? null Gets or sets the placements to try, in order, when Placement has no room. When null, Bootstrap tries top, right, bottom, and left. 4.1.0
HideDelay int 0 Gets or sets the delay before hiding, in milliseconds. Applies to the Hover and Focus triggers. 4.1.0
Id string? null Gets or sets the ID. If not set, a unique ID will be generated. 4.1.0
Offset string? null Gets or sets the offset of the popover from its trigger, as "skidding,distance" in pixels. When null, Bootstrap's "0,8" is used. 4.1.0
Placement PopoverPlacement Right Gets or sets where the popover opens relative to its trigger. Right and Left are mirrored in right-to-left layouts. 4.1.0
ShowDelay int 0 Gets or sets the delay before showing, in milliseconds. Applies to the Hover and Focus triggers. 4.1.0
Style string? null Gets or sets the CSS style string that defines the inline styles for the component. 4.1.0
Title string? null Gets or sets the title text, always shown as text. TitleTemplate takes precedence. 4.1.0
TitleTemplate RenderFragment? null Gets or sets the title markup. It updates in place while the popover is open. 4.1.0
Trigger PopoverTrigger Click Gets or sets how the popover opens. Click, Hover, and Focus can be combined, for example PopoverTrigger.Hover | PopoverTrigger.Focus; Manual cannot, and wins when combined. 4.1.0

Methods #

Name Return type Description Added Version
HideAsync() Task Hides the popover. 4.1.0
ShowAsync() Task Shows the popover. Does nothing when it has no title and no content, or when it is disabled. 4.1.0
ToggleAsync() Task Shows the popover if it is hidden, or hides it if it is shown. 4.1.0
UpdateAsync() Task Updates the position of an open popover, for example after its trigger moved. Content size changes reposition it automatically. 4.1.0

Events #

Name Return Type Description Added Version
OnHidden EventCallback This event fires after the popover is hidden. 4.1.0
OnHiding EventCallback This event fires when the popover starts to hide. 4.1.0
OnInserted EventCallback This event fires after the popover is added to the page, before it is shown. 4.1.0
OnShowing EventCallback This event fires when the popover starts to show. 4.1.0
OnShown EventCallback This event fires after the popover is shown. 4.1.0

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.