Skip to content

a-popover

Content

Implemented with Popover.

Popover

A popover element. It positions itself relative to the trigger element using Floating UI, a-portal and a-blur for focus management.

Example


<a-popover>
<div>Content</div>
</a-popover>

Methods


Popover.hide()

src/Popover.ts:145

Hide the popover.

Popover.show()

src/Popover.ts:113

Show the popover.

PopoverTrigger

A wrapper element that shows content when the user clicks with the slotted input element.

Example


<a-popover-trigger>
<button type="button" slot="trigger">
Label
</button>
<a-popover>
<div>Content</div>
</a-popover>
</a-popover>

Attributes


Name Type Default value Description
opened boolean false

Wether the content is shown or not.

Methods


PopoverTrigger.close()

src/Popover.ts:260

Closes the inner popover.

PopoverTrigger.show()

src/Popover.ts:246

Show the inner popover.

PopoverTrigger.toggle()

src/Popover.ts:274

Toggles the inner popover.