Popover

A floating panel that appears on click. Modal by default — focus is trapped and scroll is locked.

Basic

Click the trigger to open a popover with form inputs.

With Close Button

Popover with an explicit close button inside the content.

Usage

julia
using Suite

Popover(
    PopoverTrigger(
        Button(variant="outline", "Open popover")
    ),
    PopoverContent(side="bottom", align="center",
        Div(
            H4("Dimensions"),
            P("Set the dimensions for the layer."),
        )
    ),
)

Keyboard Interactions

KeyAction
EscapeCloses the popover and returns focus to the trigger

API Reference

Popover

PropTypeDefaultDescription
children...Any-Trigger and content sub-components
classString""Additional CSS classes

PopoverTrigger

PropTypeDefaultDescription
children...Any-Element that opens the popover on click
classString""Additional CSS classes

PopoverContent

PropTypeDefaultDescription
sideString"bottom"Preferred side of the trigger ("top", "right", "bottom", "left")
alignString"center"Alignment along the side ("start", "center", "end")
side_offsetInt4Distance in pixels from the trigger
children...Any-Popover panel content
classString""Additional CSS classes

PopoverClose

PropTypeDefaultDescription
children...Any-Element that closes the popover on click
classString""Additional CSS classes

PopoverAnchor

PropTypeDefaultDescription
children...Any-Custom anchor element for positioning the popover
classString""Additional CSS classes