Popup

A lightweight anchored popover — placement, an optional arrow, and click / hover / manual triggers. Flips on the main axis when it would overflow the viewport.

Placements

top
Placement: top
bottom
Placement: bottom
left
Placement: left
right
Placement: right
popup.html
html
1 <nana-popup placement="bottom-start" arrow>
2 <nana-button slot="anchor">Menu</nana-button>
3 <div>Floating content</div>
4 </nana-popup>

Hover trigger

Hover me
Shown on hover / focus.

Import

main.ts
ts
1 import "@nana-tec/ui-components/popup";

Props

AttributeTypeDefault
placementtop | bottom | left | right (+ -start / -end)bottom
triggerclick | hover | manualclick
openbooleanfalse
arrowbooleanfalse