Tesserae

Popover

Description

A reusable, anchored overlay surface used to display arbitrary IComponent content next to another component (the anchor). Popovers are the general-purpose primitive on top of which menus, comboboxes, date pickers, color pickers and similar transient surfaces are built.

Usage

API reference

class

Popover

public sealed class Popover

A reusable, anchored overlay surface used to display arbitrary content next to another component (the anchor). Popovers are the general-purpose primitive on top of which menus, comboboxes, date pickers, color pickers and similar transient surfaces are built.

Constructors

Constructor
Popover
public Popover()

Creates a new, empty popover. Configure it with and the other fluent setters before calling .

Constructor
Popover
public Popover(IComponent content)

Creates a popover whose content is already set.

Parameters

content
The component to render inside the popover.

Properties

Property
Popover.IsVisible
public bool IsVisible

Gets a value indicating whether the popover is currently displayed.

Methods

Method
Popover.Content
public Popover Content(IComponent content)

Sets the content displayed inside the popover. Replacing the content while the popover is visible will not retroactively update the rendered element; call and again to apply a new content tree.

Method
Popover.Placement
public Popover Placement(TooltipPlacement placement)

Sets the preferred placement of the popover relative to its anchor. Defaults to . The actual placement may flip automatically when there is not enough room on the preferred side.

Method
Popover.Animation
public Popover Animation(TooltipAnimation animation)

Sets the show/hide animation. Defaults to .

Method
Popover.Arrow
public Popover Arrow(bool arrow = true)

Enables or disables the small arrow that points from the popover to the anchor.

Method
Popover.MaxWidth
public Popover MaxWidth(int pixels)

Sets the maximum width of the popover surface, in pixels. Defaults to 350.

Method
Popover.Theme
public Popover Theme(string theme)

Applies a named Tippy theme to the popover (e.g. , ).

Method
Popover.HideOnClickOutside
public Popover HideOnClickOutside(bool hide = true)

Controls whether clicking outside the popover hides it. Enabled by default; disable for popovers that should stay open until explicitly closed by their content.

Method
Popover.HideOnEscape
public Popover HideOnEscape(bool hide = true)

Controls whether pressing hides the popover. Enabled by default.

Method
Popover.DelayShow
public Popover DelayShow(int milliseconds)

Adds a delay (in milliseconds) before the popover shows when is called.

Method
Popover.DelayHide
public Popover DelayHide(int milliseconds)

Adds a delay (in milliseconds) before the popover hides after is requested.

Method
Popover.OnShown
public Popover OnShown(Action action)

Registers a callback that runs once the popover has finished its show animation.

Method
Popover.OnHidden
public Popover OnHidden(Action action)

Registers a callback that runs once the popover has finished its hide animation.

Method
Popover.OnBeforeHide
public Popover OnBeforeHide(Func<bool> shouldHide)

Registers a callback that runs immediately before the popover hides. Return from the callback to cancel the hide (useful for guarding against accidental dismissal during editing).

Method
Popover.ShowFor
public Popover ShowFor(IComponent anchor)

Shows the popover anchored to the rendered element of . If the popover is already visible against a different anchor, that instance is hidden first.

Parameters

anchor
The component the popover is positioned relative to.
Method
Popover.ShowFor
public Popover ShowFor(HTMLElement anchor)

Shows the popover anchored to the given DOM element. Use this overload when you only have an element reference (for example, when reacting to a low-level event).

Method
Popover.Hide
public void Hide()

Hides the popover if it is currently visible. Safe to call repeatedly.

See also

Referenced by

© 2026 Tesserae. All rights reserved.