Sheet

Extends the Dialog component to display content that complements the main content of the screen.

Side

Use the side prop to set which edge of the screen the sheet will appear from.

No Close Button

Use the show_close_button prop to control displaying a close button.

Anatomy

Import all parts and piece them together.

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

#[component]
pub fn SheetAnatomy() -> impl IntoView {
    view! {
        <Sheet>
            <SheetTrigger>
                <Button />
            </SheetTrigger>
            <SheetContent>
                <SheetHeader>
                    <SheetTitle />
                    <SheetDescription />
                </SheetHeader>
                <SheetFooter>
                    <SheetClose>
                        <Button />
                    </SheetClose>
                </SheetFooter>
            </SheetContent>
        </Sheet>
    }
}

API Reference

Sheet

Contains all the components of a sheet.

SheetClose

Wraps a button to be used to trigger closing the sheet.

SheetContent

Contains the main content section of a sheet.

Implements global attributes.

SheetDescription

A description of sheet content that renders in the sheet header.

Implements global attributes.

SheetFooter

A component that renders at the bottom of the sheet and typically contains calls to action.

Implements global attributes.

SheetHeader

A header group that contains a title and description and renders at the top of the sheet.

Implements global attributes.

SheetTitle

A title that quickly describes sheet content.

Implements global attributes.

SheetTrigger

Wraps a button to be used to trigger opening the sheet.