fun-popover

Popover component that shows a dialog over the rest of the page on demand.

Note that the open property is one-way. Developers will need to listen to the funDismiss event and set open to false themselves. The FunDismiss event is emitted when:

If your popover will contain other floating content such as dropdowns or tooltips you should add class relative to your body content, so that positioning works properly in Firefox and safari.

Examples

Specifications

Properties

PropertyAttributeRequiredDescriptionTypeDefault
backdropbackdropfalseUse a backdrop to capture clicks outside the popover rather than capturing clicks in the document.boolean
debugdebugfalseSet to true for extra console debug logging.boolean
offsetXoffset-xfalseadds a horizontal offset between the trigger element and the popover.number15
offsetYoffset-yfalseadds a vertical offset between the trigger element and the popover.number20
openopentrueIs the popover open or not?boolean
positionpositionfalsePosition the popover in relation to the trigger element. Defaults to the ‘best’ location."auto" | "bottom" | "left" | "right" | "top"
positionStrategyposition-strategyfalseUse to override the positioning strategy, which can be helpful in some conditions."absolute" | "fixed"'absolute'

Events

NameDescription
funDismissOccurs when the popover is dismissed.

Slots

NameDescription
contentThe content to be shown inside the popover.
triggerThe element the popover should be positioned relative to. Usually clicking this element should open the popover.

Parts

NameDescription
arrow
content
popover

Dependencies

Depends on

This documentation page generated from the source at fun-popover.tsx

Search Gunnel

Powered byAlgolia