Popover is a non-modal dialog that floats around a trigger. It is used to display contextual information to the user, and should be paired with a clickable trigger element.

rc.popover(
    rc.popover_trigger(rc.button("Popover Example")),
    rc.popover_content(
        rc.popover_header("Confirm"),
        rc.popover_body("Do you want to confirm example?"),
        rc.popover_footer(rc.text("Footer text.")),
        rc.popover_close_button(),
    ),
)

rc.Popover

The wrapper that provides props, state, and context to its children.

PropType | ValuesDefault
arrow_padding
int
arrow_shadow_color
str
arrow_size
int
auto_focus
bool
boundary
str
close_on_blur
bool
close_on_esc
bool
default_is_open
bool
direction
"ltr" | "rtl"
flip
bool
gutter
int
id_
str
is_lazy
bool
lazy_behavior
str
is_open
bool
match_width
bool
placement
str
prevent_overflow
bool
return_focus_on_close
bool
strategy
"fixed" | "absolute"
trigger
"click" | "hover"

Event Triggers

See the full list of default event triggers
TriggerDescription
on_close Fired when the popover is closed.
on_open Fired when the popover is opened.

rc.PopoverTrigger

Used to wrap the reference (or trigger) element.

Props

No component specific props

rc.PopoverContent

The popover itself.

Props

No component specific props

rc.PopoverHeader

The header of the popover.

Props

No component specific props

rc.PopoverBody

The body of the popover.

Props

No component specific props

rc.PopoverFooter

Display a popover footer.

Props

No component specific props

rc.PopoverArrow

A visual arrow that points to the reference (or trigger).

Props

No component specific props

rc.PopoverAnchor

Used to wrap the position-reference element.

Props

No component specific props