Popover

Displays rich content in a portal, triggered by a button.

This component uses newly available browser features

This component uses CSS Anchor Positioning which has only been widely supported since January 2026. If you're targeting older or less mainstream browsers then maybe this component isn't for you, yet.

Alternatively you can use Singlestage 0.4 which positions the component correctly but with limited flexibility for alignment, or roll your own using Singlestage CSS classes for consistent styling.

More Info
Dimensions

Set the dimensions for the layer.

Basic

A simple popover with a header, title, and description.

Dimensions

Set the dimensions for the layer.

Align

Use the align prop on PopoverContent to control the horizontal alignment.

Aligned to start
Aligned to center
Aligned to end

With Form

A popover with form fields inside.

Dimensions

Set the dimensions for the layer.

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::*;

#[component]
pub fn PopoverAnatomy() -> impl IntoView {
    view! {
        <Popover>
            <PopoverTrigger>
                <Button />
            </PopoverTrigger>
            <PopoverContent>
                <PopoverHeader>
                    <PopoverTitle />
                    <PopoverDescription />
                </PopoverHeader>
            </PopoverContent>
        </Popover>
    }
}

API Reference

Popover

Contains all the parts of a popover.

Custom Attributes
NameTypeDefaultDescription
modalboolfalse

Set whether or not this popover should be modal meaning it can't be light dismissed Use this along with the `open` signal for a manually managed popover

openboolfalse

Reactive signal that can remotely control the open state of the popover **but is not coupled to the actual open state of the popover** unless `modal` is set to `true`

Implements global attributes.

PopoverContent

The component that pops out when the popover is open.

Custom Attributes
NameTypeDefaultDescription
alignString"start"

Set how to align the popover. Accepted values are "start" | "center" | "end"

sideString"bottom"

Set which side the popover opens relative to the trigger. Accepted values are "top" | "right" | "bottom" | "left".

Implements global attributes.

PopoverDescription

Displays a description of popover content

Implements global attributes.

PopoverHeader

A styled header container for use inside a PopoverContent.

Implements global attributes.

PopoverTitle

Contains the title of the popover.

Implements global attributes.

Trigger

Provides context to a `Button` that triggers a popover..

Implements global attributes.