# Popover

**Path:** Components/Popover

[Back to Documentation Index](http://rubicblazor.skyconis.com/docs.md)

---

Popover

 Popovers render contextual content relative to an element or page position.

 Show code

 Show Popover

 Anchor

 Open service-driven content relative to a DOM element id.

 Show code

 Show Popover

 Reference

 Control an RbPopover instance directly through a component reference.

 Show code

 Show Popover

 Show Popover

 Component Content

 Open a Razor component with strongly typed parameters and a close result.

 Show code

 Open razor component

 Last Result: - 

 Currency: Turkmenistan Manati 

 Right Click

 Position contextual content at page coordinates.

 Show code

 Right click anywhere in this area.
 Popover opens at cursor position (service-driven).

 Auto Focus

 Focus the first interactive element when the popover opens.

 Show code

 Show Popover

 Sizing

 Apply width, height, and maximum size constraints to popover content.

 Show code

 Open Sized Popover

 Nested Popovers

 Open a child popover from content inside another popover.

 Show code

 Show Popover

 RTL Support

 Popover direction follows the local RTL context from which it is opened.

 Show code

 قائمة منبثقة داخل حاوية RTL

 يجب أن يظهر المحتوى المنبثق بمحاذاة واتجاه صحيحين دون ضبط يدوي داخل المحتوى.

 فتح القائمة

 API

 RbDialogService.ShowAsync<TComponent>

 Opens a popover by rendering a Blazor component through the dialog service.

 Parameters

 RbComponentParameters<TComponent> parameters = null

 Optional component parameters passed to the popover content.

 Action<RbDialogOptions> opt = null

 Optional options builder used to configure anchor, page position, focus, sizing, and close behavior.

 Return

 Task<int> 

 Returns the close code. Typical values are 1 for explicit submit-style close actions and 0 for dismiss flows.

 RbDialogService.ShowAsync(Type componentType, ... )

 Opens a popover from a runtime component type instead of a generic type argument.

 Parameters

 Type componentType 

 Component type to render inside the popover. The type must implement IComponent.

 RbComponentParameters parameters = null

 Optional runtime parameter bag passed to the popover content.

 Action<RbDialogOptions> opt = null

 Optional options builder used to configure popover behavior and placement.

 Return

 Task<int> 

 Returns the close code.

 RbDialogService.ShowAsync(RenderFragment<RbDialogContext> content, ... )

 Opens a popover from inline fragment content when you do not want a separate component file.

 Parameters

 RenderFragment<RbDialogContext> content 

 Inline popover content. The dialog context gives access to CloseAsync and the result code.

 Action<RbDialogOptions> opt = null

 Optional options builder used to configure anchor, cursor position, focus, sizing, and close behavior.

 Return

 Task<int> 

 Returns the close code.

 RbPopover.ShowAsync() / ShowAsync(bool Focus)

 Shows a referenced RbPopover instance directly without service orchestration.

 Parameters

 bool Focus = true

 Focuses the first focusable element inside the popover when true.

 Return

 Task 

 Completes when show work is dispatched.

 RbPopover.ShowAsync(string AnchorElementId, bool Focus = true)

 Shows a referenced popover anchored to a DOM element id.

 Parameters

 string AnchorElementId 

 Element id used as the popover anchor.

 bool Focus = true

 Focuses the first focusable element inside the popover when true.

 Return

 Task 

 Completes when show work is dispatched.

 RbPopover.ShowAsync(double PageX, double PageY, bool Focus = true)

 Shows a referenced popover at cursor or page coordinates.

 Parameters

 double PageX 

 Horizontal page coordinate for placement.

 double PageY 

 Vertical page coordinate for placement.

 bool Focus = true

 Focuses the first focusable element inside the popover when true.

 Return

 Task 

 Completes when show work is dispatched.

 ✕

 Contents
