Zum Hauptinhalt springen

Wir haben KoliBri - Public UI v3 veröffentlicht. Für die LTS Version, siehe .

Ihre Meinung ist uns wichtig! Gemeinsam mit Ihnen möchten wir KoliBri stetig verbessern. Teilen Sie uns Ihre Ideen, Wünsche oder Anregungen mit – schnell und unkompliziert.

PopoverButton

Der PopoverButton ist eine Komponente, die einen Button mit einem zugehörigen Popover-Menü kombiniert. Das Popover wird durch Klicken auf den Button ein- und ausgeblendet. Die Beschriftung des Buttons kann über das _label-Attribut festgelegt werden. Die Position des Popovers lässt sich über _popover-align steuern, wobei das Popover wahlweise oberhalb, rechts, unterhalb oder links vom Button platziert werden kann.

Der PopoverButton eignet sich besonders für:

  • Zusätzliche Informationen
  • Kontextmenüs
  • Ausklappbare Bedienelemente

Konstruktion

Code

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

Beispiel

Weitere Informationen im 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
_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 that the button emits on click.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>

Slots

SlotDescription
The popover content.

Beispiel ansehen

Live-Editor

Beispiele