Popover — Playground

px
placement
align
triggerType
State
html.html
<button [kuiPopoverFor]="myPop" kuiButton type="button">Open</button>

<kui-popover #myPop>
  <div class="kui-popover-title">Title</div>
  <div class="kui-popover-desc">Supporting text.</div>
</kui-popover>
NameTypeDefaultDescription
placement'top' | 'bottom' | 'left' | 'right' | undefinedundefinedPreferred side of the anchor (defaults.popover.placement, then bottom). Auto-flips to the opposite side to fit the viewport.
align'start' | 'center' | 'end' | undefinedundefinedAlignment of the panel along the anchor edge (defaults.popover.align, then center). Preserved after a placement flip.
arrowboolean | undefinedundefinedShows the arrow caret pointing to the anchor. Falls back to defaults.popover.arrow, then false.
triggerType'click' | 'hover' | undefinedundefinedFalls back to defaults.popover.triggerType, then click. click toggles the panel on click and closes on outside click or ESC. hover opens on mouseenter and closes on mouseleave.
ariaLabelstring | undefinedundefinedAccessible name for the role="dialog" panel. Falls back to the popover.label message (Popover); prefer content-specific text.
hoverDelaynumber | undefinedundefinedDelay in ms before closing on mouseleave in hover mode (defaults.popover.hoverDelay, then 100). Lets the mouse travel from trigger to panel.
offsetnumber | undefinedundefinedGap in px between the anchor and the panel (defaults.popover.offset, then 8). The arrow adds 6px automatically. A static numeric string is coerced.
trapFocusbooleanfalseTraps focus inside the panel and auto-focuses the first focusable element on open.
openboolean (model)falseCurrent open state exposed for trigger integrations via openChange. Not intended as a standalone controlled API.
[kuiPopoverFor]KuiPopover | undefined-Wires any element as a trigger for a kui-popover. Sets aria-expanded and aria-haspopup="dialog" automatically.
.kui-popover-title--Optional CSS class for a semi-bold sm title inside the projected content.
.kui-popover-desc--Optional CSS class for secondary sm supporting text inside the projected content.
--kui-popover-bgCSS custom propertyvar(--kui-color-surface-elevated)Panel background.
--kui-popover-borderCSS custom propertyvar(--kui-color-border)Panel border color.
--kui-popover-radiusCSS custom propertyvar(--kui-radius-lg)Panel corner radius.
--kui-popover-shadowCSS custom propertyvar(--kui-shadow-lg)Panel drop shadow.
--kui-popover-padding-xCSS custom propertyvar(--kui-space-4)Panel horizontal padding.
--kui-popover-padding-yCSS custom propertyvar(--kui-space-4)Panel vertical padding.
--kui-popover-min-widthCSS custom property160pxMinimum panel width.
--kui-popover-max-widthCSS custom property320pxMaximum panel width.
--kui-popover-arrow-sizeCSS custom property10pxArrow caret size.
--kui-z-popoverCSS custom property400Panel z-index in browsers without the Popover API.
openFor(anchor)(anchor: Element) => void-Opens the popover anchored to the given element.
toggleFor(anchor)(anchor: Element) => void-Toggles the popover for a trigger and reopens immediately when an exit animation is running.
close()() => void-Closes the popover with the exit animation.
scheduleClose(delay)(delay: number) => void-Schedules a close after delay ms (hover mode).
cancelClose()() => void-Cancels a pending scheduled close.
KuiPopoverOptionsinterface-Shape of defaults.popover: placement, offset, align, arrow, triggerType and hoverDelay.

Inputs verified against @kikita-labs/ui v2.0.0 v2.0.0 public typings.