Skip to main content

parent

Description​

Optional. An HTML element relative to which the popup will be positioned

Usage​

parent?: HTMLElement;

Example​

<div bind:this={node}>
<Button type="block" onclick={showPopup}>Show next to button</Button>
</div>
{#if isOpen}
<Popup parent={node} >
<p>Some text</p>
</Popup>
{/if}