Components
Popover
Popovers reveal contextual content close to a trigger without fully interrupting the current flow. They work well for quick settings, lightweight explanations, and compact supporting UI.
Basic Usage
Use a trigger plus content container for the most common contextual popover pattern.
Placement
Position the popover on the side that best matches the surrounding control.
Form Content
Use compact form controls when the interaction should stay close to the trigger.
With Arrow
with-arrow draws a floating-ui arrow aimed at the trigger. Works with any placement.
API
Slots
| Name | Description |
|---|---|
trigger | Popover trigger |
(default) | Popover content |
Attributes & Properties
| Name | Description |
|---|---|
anchor | Live element anchor — use when the target lives in another shadow tree (e.g. TipTap chips). Preferred over for / trigger slot when set. Stays in the consumer tree so modal showModal() inert does not apply (unlike portaling the panel to a root outside the dialog).Type Element | nullDefault null |
flush | Drop default panel padding/fixed width so slotted content (command lists, etc.) can control its own inset. Consumer outer p-0 alone cannot reach .panel.Type booleanDefault false |
for | Anchor element id — alternative to the trigger slot. Type string |
open | Type booleanDefault false |
placement | Type PkPopupPlacementDefault bottom |
sideOffset side-offset | Type numberDefault 4 |
withArrow with-arrow | Show a floating-ui arrow on the panel (off by default). Named like other optional controls (with-clear, with-caret) — tooltip always paints its own arrow and has no toggle.Type booleanDefault false |
Events
| Name | Description |
|---|---|
pk-open-change | — |
CSS Parts
| Name | Description | CSS selector |
|---|---|---|
panel | Floating content panel | ::part(panel) |
Dependencies
This component registers the following elements when it loads.
| Name | Description |
|---|---|
pk-popup | — |
Edit this page
Last updated: Sep 15, 2026, 1:09 PM