Skip to content

Popover ​

A trigger-anchored free-content panel for small forms and inspectors.

Examples ​

With a slider inside ​

moonbit
@sumi.popover(
  trigger=@sumi.button(variant=@sumi.Secondary, [
    @sumi.icon_adjust(size=14),
    @html.text("Adjust"),
  ]),
  open=is_open,
  on_open_change=set_open.map(v => _ => v),
  panel_content,
)

API ​

popover ​

NameTypeDefaultDescription
trigger *Html—The anchor element
open *Bool—Whether the overlay is open (controlled)
on_open_changeEmit[Bool]—Called when the open state should change
alignMenuAlignStartHorizontal alignment against the trigger
sideMenuSideBottomOpen above or below the trigger
idString—Element id
classString—Extra class names
attrsAttrs—Extra HTML attributes
styleArray[String][]Extra inline styles
panel_styleArray[String][]Styles for the floating panel
childrenC—Content

Start · End

Bottom · Top

* required (labelled) parameter — everything else is optional.