Skip to main content

We have released KoliBri - Public UI v4 (Next). For the LTS version, see .

Your opinion matters! Together with you, we want to continuously improve KoliBri. Share your ideas, wishes, or suggestions—quickly and easily.

PopoverButton

The PopoverButton is a component that combines a button with an associated popover menu. The popover is shown and hidden by clicking on the button. The label of the button can be set using the _label attribute. The position of the popover can be controlled via _popover-align, whereby the popover can be placed either above, to the right, below or to the left of the button.

The PopoverButton is particularly suitable for:

  • Additional Information
  • Context menus
  • Fold-out controls

Construction

Code

<kol-popover-button _label="Weitere Informationen" _icons="codicon codicon-info" _popover-align="right">
Weitere Informationen im Popover.
</kol-popover-button>

Example

Further information in the popover.

Properties

PropertyAttributeDescriptionTypeDefault
_accessKey_access-keyDefines the key combination that can be used to trigger or focus the component's interactive element.string | undefinedundefined
_ariaControls_aria-controlsDefines which elements are controlled by this component. (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-controls)string | undefinedundefined
_ariaDescription_aria-descriptionDefines the value for the aria-description attribute.string | undefinedundefined
_ariaSelected_aria-selectedDefines whether the interactive element of the component is selected (e.g. role=tab). (https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-selected)boolean | undefinedundefined
_customClass_custom-classDefines the custom class attribute if _variant="custom" is set.string | undefinedundefined
_disabled_disabledMakes the element not focusable and ignore all events.boolean | undefinedfalse
_hideLabel_hide-labelHides the caption by default and displays the caption text with a tooltip when the interactive element is focused or the mouse is over it.boolean | undefinedfalse
_icons_iconsDefines the icon classnames (e.g. _icons="fa-solid fa-user").KoliBriHorizontalIcons & KoliBriVerticalIcons | string | undefinedundefined
_inline_inlineDefines whether the component is displayed as a standalone block or inline without enforcing a minimum size of 44px.boolean | undefinedfalse
_label (required)_labelDefines the visible or semantic label of the component (e.g. aria-label, label, headline, caption, summary, etc.). Set to false to enable the expert slot.stringundefined
_name_nameDefines the technical name of an input field.string | undefinedundefined
_on--Defines the callback functions for button events.undefined | { onClick?: EventValueOrEventCallback<MouseEvent, StencilUnknown> | undefined; onMouseDown?: EventCallback<MouseEvent> | undefined; }undefined
_popoverAlign_popover-alignDefines where to show the Popover preferably: top, right, bottom or left."bottom" | "left" | "right" | "top" | undefined'bottom'
_role_roleDefines the role of the components primary element."tab" | "treeitem" | undefinedundefined
_shortKey_short-keyAdds a visual shortcut hint after the label and instructs the screen reader to read the shortcut aloud.string | undefinedundefined
_tabIndex_tab-indexDefines which tab-index the primary element of the component has. (https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex)number | undefinedundefined
_tooltipAlign_tooltip-alignDefines where to show the Tooltip preferably: top, right, bottom or left."bottom" | "left" | "right" | "top" | undefined'top'
_type_typeDefines either the type of the component or of the components interactive element."button" | "reset" | "submit" | undefined'button'
_value_valueDefines the value of the element.boolean | null | number | object | string | undefinedundefined
_variant_variantDefines which variant should be used for presentation."custom" | "danger" | "ghost" | "normal" | "primary" | "secondary" | "tertiary" | undefined'normal'

Methods

hidePopover

hidePopover() => Promise<void>

Hides the popover programmatically by calling the native hidePopover method.

Returns

Type: Promise<void>

kolFocus() => Promise<void>

Sets focus on the internal element.

Returns

Type: Promise<void>

showPopover() => Promise<void>

Show the popover programmatically by calling the native showPopover method.

Returns

Type: Promise<void>

Slots

SlotDescription
The popover content.

View example

Live editor

Examples