overlay — wyrd.component.popover

Popover

Non-modal anchored overlay with a trigger slot, open state, dismissal, and collision-aware positioning.

Install @wyrd-company/react or the Flutter package and use it directly — your DESIGN.md does the styling.

01

Examples

Generated from the contract's examples block. Previews are the published @wyrd-company/react component, themed by the brand's role tokens — flip the site's light/dark toggle and they follow.

Code target Applies to every example on component pages.
basic state: closed
Usage
import { WyrdPopover } from "@wyrd-company/react";

export function PopoverInteractionExample() {
  return <WyrdPopover placement="bottom" trigger={<button type="button">Details</button>}>
    Additional details for the selected item.
  </WyrdPopover>;
}
open state: open
Details
Usage
import { WyrdPopover } from "@wyrd-company/react";

<WyrdPopover defaultOpen placement="bottom" trigger="Details">
  Additional details for the selected item.
</WyrdPopover>

// events: onOpenChange
hover-card state: closed
Profile
Usage
import { WyrdPopover } from "@wyrd-company/react";

<WyrdPopover triggerMode="hover" placement="bottom" trigger="Profile">
  Profile details and actions.
</WyrdPopover>

// events: onOpenChange
nondismissible state: open
Inspector
Usage
import { WyrdPopover } from "@wyrd-company/react";

<WyrdPopover defaultOpen dismissible={false} trigger="Inspector">
  Persistent inspector controls.
</WyrdPopover>

// events: onOpenChange
02

Properties

NameTypeDefaultSummary
is-open boolean false Controlled popover visibility.
default-open boolean false Initial uncontrolled popover visibility.
placement top | bottom | start | end bottom Preferred surface placement relative to the trigger.
trigger-mode click | hover click Interaction that opens the popover; hover also supports keyboard focus.
dismissible boolean true Allows Escape and outside pointer dismissal.
03

Slots & events

SlotCardinalityAcceptsSummary
trigger exactly-one component Anchor component; clicking it toggles the popover.
content one-or-many component, content, node Popover surface content.
EventPayloadSummary
open-change is-open, reason Canonical open-state change event.
04

Tokens

The contract's token bindings. Open the shared contextual sidebar from any example; primary swatches reflect the color you pick there. Error swatches show the active preset's values; editing any knob switches to custom and resets error to TWW · Ink.

BindingToken
surface.background color.surface-container
surface.foreground color.on-surface
surface.border-color color.outline
border-width 1px
radius rounded.md
shadow shadow.md
padding-x spacing.md
padding-y spacing.md
offset spacing.xs
05

States

StateSourceSummary
closed behavior-runtime Popover content is hidden.
open behavior-runtime Popover content is visible and anchored to the trigger.
06

Accessibility

From the contract's accessibility obligations. Role none; Popover surface has no required accessible name and therefore does not force role=dialog in v1.

  • Escape closes the popover and restores focus to the trigger when dismissible is true.
  • Hover trigger mode opens when keyboard focus enters the trigger and remains open while focus is within the trigger or popover content.
  • Popover is non-modal; it does not trap focus and does not make background content inert.
  • Trigger exposes aria-expanded.
  • Trigger exposes aria-controls.
  • Focus moves into the popover only when it contains a focusable descendant.
  • Verified under: rtl, reduced-motion, cvd-deuteranopia, density-compact, text-expansion.
07

SDUI

Status: serializable. Popover serializes trigger/content slots and open-state data. Web projections use collision-aware fixed positioning through the hand-written package positioning utility. The popover is non-modal; hosts must not infer focus trap or inert background behavior.

SerializableMembers
Propertiesis-open, default-open, placement, trigger-mode, dismissible
Slotstrigger, content
Eventsopen-change
The Wyrding Way — a contract-first design system. © Wyrd Company