`Popover` provides a floating container that displays content relative to a trigger element. It supports various alignments, caret indicators, and visual variants.
## Default
Create a basic popover with absolute positioning.
## Relative position
Set `relative` to `true` to position the popover relative to its parent element.
## Close on outside click
Enable automatic closing when clicking outside the popover using `closeOnOutsideClick`.
Parent
{console.log('on:click:outside')}}>
Content
## Popover alignment
Customize the popover alignment using the `align` prop. Valid values include: `"top" | "top-left" | "top-right" | "bottom" | "bottom-left" | "bottom-right" | "left" | "left-bottom" | "left-top" | "right" | "right-bottom" | "right-top"`.
The default `align` value is `"top"`.
## With caret
Add a caret indicator to the popover using the `caret` prop.
## Custom caret alignment
By default, the caret is aligned "top". Possible `align` values include `"top"`, `"top-left"`, `"top-right"`, `"bottom"`, `"bottom-left"`, `"bottom-right"`, `"left"`, `"left-bottom"`, `"left-top"`, `"right"`, `"right-bottom"` or `"right-top"`.
## Light variant
Enable the light variant for use on dark backgrounds.
## High contrast variant
Enable the high contrast variant for improved visibility.
## External element
Use the `open` prop to manage state with an external element, like a button.