Popover

Rust UI component that displays rich content in a portal, triggered by a button.

popover
  • Rust UI Icons - CopyCopy Demo

Popover Demo

Interactive popover that adapts its position as you scroll. Try scrolling to see the smart positioning in action.

use leptos::prelude::*;

use crate::components::_coming_soon::popover::{
    Popover, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger,
};

#[component]
pub fn DemoPopover() -> impl IntoView {
    view! {
        <Popover>
            <PopoverTrigger>Open Popover</PopoverTrigger>

            <PopoverContent class="w-[300px]">
                <PopoverTitle>"Popover Demo"</PopoverTitle>

                <PopoverDescription>
                    "Interactive popover that adapts its position as you scroll. Try scrolling to see the smart positioning in action."
                </PopoverDescription>
            </PopoverContent>
        </Popover>
    }
}

Installation

# Coming soon :)

Usage

// Coming soon 🦀

Examples

1. Popover Aligned Start

Start-aligned popover that anchors to the left edge. Watch how it repositions intelligently as you scroll.

  • Rust UI Icons - CopyCopy Demo

Popover Start

Start-aligned popover that anchors to the left edge. Watch how it repositions intelligently as you scroll.

use leptos::prelude::*;

use crate::components::_coming_soon::popover::{
    Popover, PopoverAlign, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger,
};

#[component]
pub fn DemoPopoverStart() -> impl IntoView {
    view! {
        <Popover align=PopoverAlign::Start>
            <PopoverTrigger>Popover (Start)</PopoverTrigger>

            <PopoverContent class="w-[300px]">
                <PopoverTitle>"Popover Start"</PopoverTitle>

                <PopoverDescription>
                    "Start-aligned popover that anchors to the left edge. Watch how it repositions intelligently as you scroll."
                </PopoverDescription>
            </PopoverContent>
        </Popover>
    }
}

2. Popover Aligned End

End-aligned popover that anchors to the right edge. Watch how it repositions intelligently as you scroll.

  • Rust UI Icons - CopyCopy Demo

Popover End

End-aligned popover that anchors to the right edge. Notice the smart positioning behavior during scroll.

use leptos::prelude::*;

use crate::components::_coming_soon::popover::{
    Popover, PopoverAlign, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger,
};

#[component]
pub fn DemoPopoverEnd() -> impl IntoView {
    view! {
        <Popover align=PopoverAlign::End>
            <PopoverTrigger>Popover (End)</PopoverTrigger>

            <PopoverContent class="w-[300px]">
                <PopoverTitle>"Popover End"</PopoverTitle>

                <PopoverDescription>
                    "End-aligned popover that anchors to the right edge. Notice the smart positioning behavior during scroll."
                </PopoverDescription>
            </PopoverContent>
        </Popover>
    }
}

3. Popover Aligned StartOuter

StartOuter-aligned popover that positions completely to the left of the trigger button. The popover's right edge starts where the button's left edge ends.

  • Rust UI Icons - CopyCopy Demo

Popover StartOuter

StartOuter-aligned popover that positions completely to the left of the trigger button. The popover's right edge starts where the button's left edge ends.

use leptos::prelude::*;

use crate::components::_coming_soon::popover::{
    Popover, PopoverAlign, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger,
};

#[component]
pub fn DemoPopoverStartOuter() -> impl IntoView {
    view! {
        <Popover align=PopoverAlign::StartOuter>
            <PopoverTrigger>Popover (StartOuter)</PopoverTrigger>

            <PopoverContent class="w-[300px]">
                <PopoverTitle>"Popover StartOuter"</PopoverTitle>

                <PopoverDescription>
                    "StartOuter-aligned popover that positions completely to the left of the trigger button. The popover's right edge starts where the button's left edge ends."
                </PopoverDescription>
            </PopoverContent>
        </Popover>
    }
}

4. Popover Aligned EndOuter

EndOuter-aligned popover that positions completely to the right of the trigger button. The popover's left edge starts where the button's right edge ends.

  • Rust UI Icons - CopyCopy Demo

Popover EndOuter

EndOuter-aligned popover that positions completely to the right of the trigger button. The popover's left edge starts where the button's right edge ends.

use leptos::prelude::*;

use crate::components::_coming_soon::popover::{
    Popover, PopoverAlign, PopoverContent, PopoverDescription, PopoverTitle, PopoverTrigger,
};

#[component]
pub fn DemoPopoverEndOuter() -> impl IntoView {
    view! {
        <Popover align=PopoverAlign::EndOuter>
            <PopoverTrigger>Popover (EndOuter)</PopoverTrigger>

            <PopoverContent class="w-[300px]">
                <PopoverTitle>"Popover EndOuter"</PopoverTitle>

                <PopoverDescription>
                    "EndOuter-aligned popover that positions completely to the right of the trigger button. The popover's left edge starts where the button's right edge ends."
                </PopoverDescription>
            </PopoverContent>
        </Popover>
    }
}