Skip to contents

Create a Popover component

Usage

calcite_popover(...)

Arguments

...

named attributes passed to htmltools::tag()

Value

an object of class calcite_component which is a subclass of shiny.tag

Details

Properties

The following properties are provided by this component:

NameAttributeDescriptionValuesReflects to Attribute
autoCloseauto-closeWhen true, clicking outside of the component automatically closes open calcite-popovers.booleanTRUE
closableclosableWhen true, displays a close button within the component.booleanTRUE
flipDisabledflip-disabledWhen true, prevents flipping the component's placement when overlapping its referenceElement.booleanTRUE
flipPlacementsNASpecifies the component's fallback placement when it's initial or specified placement has insufficient space available.Check API referenceFALSE
focusTrapDisabledfocus-trap-disabledWhen true, prevents focus trapping.booleanTRUE
headingheadingThe component header text.stringFALSE
headingLevelheading-levelSpecifies the heading level of the component's heading for proper document structure, without affecting visual styling.1 | 2 | 3 | 4 | 5 | 6TRUE
initialFocusTrapFocusinitial-focus-trap-focusSpecifies whether focus should move to the popover when the focus trap is activated. @internal((() => FocusTargetValueOrFalse)) | HTMLElement | SVGElement | boolean | stringFALSE
labellabelAccessible name for the component.stringFALSE
messageOverridesNAUse this property to override individual strings used by the component.Check API referenceFALSE
offsetDistanceoffset-distanceOffsets the position of the popover away from the referenceElement.numberTRUE
offsetSkiddingoffset-skiddingOffsets the position of the component along the referenceElement.numberTRUE
openopenWhen true, displays and positions the component.booleanTRUE
overlayPositioningoverlay-positioningDetermines the type of positioning to use for the overlaid content. Using "absolute" will work for most cases. The component will be positioned inside of overflowing parent containers and will affect the container's layout. "fixed" value should be used to escape an overflowing parent container, or when the reference element's position CSS property is "fixed"."absolute" | "fixed"TRUE
placementplacementDetermines where the component will be positioned relative to the referenceElement."auto" | "auto-end" | "auto-start" | "bottom" | "bottom-end" | "bottom-start" | "leading" | "leading-end" | "leading-start" | "left" | "left-end" | "left-start" | "right" | "right-end" | "right-start" | "top" | "top-end" | "top-start" | "trailing" | "trailing-end" | "trailing-start"TRUE
pointerDisabledpointer-disabledWhen true, removes the caret pointer.booleanTRUE
referenceElementreference-elementThe referenceElement used to position the component according to its placement value. Setting to an HTMLElement is preferred so the component does not need to query the DOM. However, a string id of the reference element can also be used.Element | VirtualElement | stringFALSE
scalescaleSpecifies the size of the component."l" | "m" | "s"TRUE
triggerDisabledtrigger-disabledWhen true, disables automatically toggling the component when its referenceElement has been triggered. This property can be set to true to manage when the component is open.booleanTRUE

Events

The following events are observed by shiny:

EventDescription
calcitePopoverBeforeCloseFires when the component is requested to be closed and before the closing transition begins.
calcitePopoverBeforeOpenFires when the component is added to the DOM but not rendered, and before the opening transition begins.
calcitePopoverCloseFires when the component is closed and animation is complete.
calcitePopoverOpenFires when the component is open and animation is complete.

Slots

The following slots are provided by this component:

SlotDescription
Default (unnamed)A slot for adding custom content.

Examples

calcite_popover()
#> <calcite-popover></calcite-popover>