Vivid API

Popover

Displays floating rich content anchored to a specific trigger element, rendering on top of all other page elements.

Placement

The placement attribute controls the position of the Popover relative to its anchor element. See the API Reference for all possible values.

The Popover will attempt to position itself where the placement attribute dictates (or the default of bottom if not set). If it is unable to do so, because of lack of available space on the screen, it will flip the Popover to the opposite side.

Layout

The layout attribute allows you to enable a condensed layout with smaller paddings and gaps.

If you need to set custom paddings and gaps, use CSS variables.

Arrow

The arrow attribute adds a small triangle to indicate the trigger element.

Alternate

The alternate attribute changes the Popover’s color scheme to the opposite of the currently select one (e.g. from light to dark).

Offset

Use the offset attribute to customize the gap (in px) between the Popover and the trigger element.

  • Type: number | null
  • Default: 8