Skip to content

Latest commit

 

History

History

popover

-----------------------------------------------------

➤ wl-popover

Contextual anchored elements.

-----------------------------------------------------

➤ Properties

Property Attribute Type Default Description
anchor anchor string | Element | undefined Anchor element or query.
anchorCloseEvents anchorCloseEvents string[] | undefined Events on the anchor that makes the popover close itself.
anchorOpenEvents anchorOpenEvents string[] | undefined Events on the anchor that makes the popover open itself.
anchorOriginX anchorOriginX OriginX X origin of the anchored point.
anchorOriginY anchorOriginY OriginY Y origin of the anchored point.
backdrop backdrop boolean Whether the backdrop is visible or not.
blockScrolling blockScrolling boolean Whether the overlay blocks the scrolling on the scroll container.
closeOnClick closeOnClick boolean Makes the popover close when it is clicked upon.
disableFocusTrap disableFocusTrap boolean Whether the focus trap be disabled.
duration duration number 200 The duration of the animations.
fixed fixed boolean Whether the overlay is fixed or not.
helloWorld helloWorld boolean
noFallback noFallback boolean Whether a fallback strategy for the positioning should be used when there are no room for the popover.
open open boolean Whether the overlay is open or not.
persistent persistent boolean Whether the overlay is persistent or not. When the overlay is persistent, ESCAPE and backdrop clicks won't close it.
role role AriaRole "menu" Role of the popover.
scrollContainer scrollContainer EventTarget The container the overlay lives in.
transformOriginX transformOriginX OriginX X origin of the transform.
transformOriginY transformOriginY OriginY Y origin of the transform.

-----------------------------------------------------

➤ Events

Event Description
didhide Dispatches after the overlay has been hidden.
didshow Dispatches after the overlay has been shown.

-----------------------------------------------------

➤ CSS Custom Properties

Property Description
--popover-z-index z-index.

-----------------------------------------------------

➤ Slots

Name Description
Default content.

-----------------------------------------------------

➤ Usage

Go here to try the demo.

-----------------------------------------------------

➤ Contributors

Andreas Mehlsen You?
Andreas Mehlsen You?

-----------------------------------------------------

➤ License

Licensed under MIT.