euv-docs 0.48.1

Cross-platform documentation viewer and static site generator powered by euv and euv-ui.
Documentation
---
title: Sheet
order: 51
---

A zero-overshoot bottom sheet (`EuvSheet`) featuring an interactive top floating grabber pill that supports dragging downward to dismiss and dragging upward to expand to an aesthetic maximum height.

## Installation

```shell
cargo add euv euv-ui
```

## Declarative Macro Usage

```rust
let on_close = move |_: &UiEvent| {
    let _: bool = sheet_open.set_if_changed(false);
};
let sheet_body: NodeId = view! {
    column {
        style: {
            width: Length::Percent(100.0)
            gap: SPACE_MD
        }
        text {
            style: {
                width: Length::Percent(100.0)
            }
            "Hold the top grabber pill: drag down to close or drag up to expand."
        }
        EuvButton {
            label: "Close Sheet"
            tokens: tokens
            outline()
            on_click: on_close
        }
    }
};
view! {
    EuvSheet {
        open: sheet_open
        title: "Quick Sheet"
        body: sheet_body
        tokens: tokens
    }
}
```

## Gesture & Animation Behavior

- **Drag Up to Expand**: Smoothly expands panel height up to `min(86% viewport, 760px)` with an internal scroll body.
- **Drag Down to Collapse / Dismiss**: Dragging down from expanded collapses to the compact resting height, and dragging further downward dismisses the sheet smoothly.
- **Zero Overshoot**: Uses strictly monotonic `Easing::EaseOutQuint` / `Easing::EaseOutCubic` transitions.