---
title: "Sheet"
status: accepted
source: "design/HANDOVER.md · Sheets, not dialogs; design/BOTTOM-SHEET.md; docs/sheets.md"
updated: "21.11.2026."
url: https://design.mojakirija.rs/components/sheet
---

# Sheet

Accepted · design/HANDOVER.md · Sheets, not dialogs; design/BOTTOM-SHEET.md; docs/sheets.md

Everything that opens: the right-hand side sheet on desk, the bottom sheet on a phone.

Import from `@/components/ui/sheet/sheet.tsx`. No centre-screen dialogs: the phone is held in one hand. Below 640px a sheet comes up from the bottom with a grabber; above it, a create or edit form opens in the right-hand side sheet (460px, or 560px for the file viewer).

A sheet owns the viewport, so its live example runs on its own stage page: [open the Sheet stage](https://design.mojakirija.rs/stage/sheet).

## Rules

- One primary action, in the footer.
- A longer form in a bottom sheet opens to the top of the screen (16px of the page showing) and scrolls; a short sheet is as tall as its content.
- A dirty form asks before it closes, for every exit: close, Esc, the scrim, a drag, system Back.
- The URL owns an open sheet (`useSheetRoute`), so Back closes it and a link opens it.

## CRUD in one slot (M1)

- **Accepted 21.11.2026** ([D-2026-11-21-16](https://design.mojakirija.rs/decisions#D-2026-11-21-16)): every create, edit and detail opens in one slot: the right column on desk (the second card, with "Proširite" for wide content), the bottom sheet on a phone, the same component.
- No centred dialogs. Destructive actions confirm in the row.
- Exceptions: long multi-section flows stay full pages; a small choice is a menu under its trigger; one short non-money value may be edited in place.
- The dirty-form guard is required before the column becomes non-modal. Today's Sheet is still the overlay drawn above.

## Usage

```tsx
const [open, setOpen] = useState(false);

<Sheet open={open} onOpenChange={setOpen} closeLabel="Zatvorite">
  <Sheet.Header title="Nova kirija" subtitle="Primer stan" />
  <Sheet.Body>…</Sheet.Body>
  <Sheet.Footer><Button block>Sačuvajte</Button></Sheet.Footer>
</Sheet>
```
