# Sheet _(no submodules)_ - sheet.variants — `sheetOverlayVariants`, `sheetCont… - [sheet.variants](./sheet.variants.md) — `sheetOverlayVariants`, `sheetContentVariants`, `sheetHeaderVariants`, `sheetFooterVariants`, `sheetTitleVariants`, `sh… - sheet.variants — `sheetOverlayVariants`, `sheetCont… - [sheet.variants](./sheet.variants.md) — `sheetOverlayVariants`, `sheetContentVariants`, `sheetHeaderVariants`, `sheetFooterVariants`, `sheetTitleVariants`, `sh… - sheet.variants — `sheetOverlayVariants`, `sheetCont… - [sheet.variants](./sheet.variants.md) — `sheetOverlayVariants`, `sheetContentVariants`, `sheetHeaderVariants`, `sheetFooterVariants`, `sheetTitleVariants`, `sh… - sheet.variants — `sheetOverlayVariants`, `sheetCont… - [sheet.variants](./sheet.variants.md) — `sheetOverlayVariants`, `sheetContentVariants`, `sheetHeaderVariants`, `sheetFooterVariants`, `sheetTitleVariants`, `sh… - [sheet.variants](./sheet.variants.md) — `sheetOverlayVariants`, `sheetContentVariants`, `sheetHeaderVariants`, `sheetFooterVariants`, `sheetTitleVariants`, `sh… ## Purpose `` and its sub-components (``, ``, ``, ``, ``, ``, ``, ``, ``) are the chassis side-anchored panel primitives built on `@radix-ui/react-dialog`. Sheet is structurally a Dialog with side-anchored positioning, so Radix supplies the same WAI-ARIA dialog semantics (focus-trap, restore-focus, Escape closes, click-outside closes) and the chassis adds a `side` axis on `` (`top` / `right` / `bottom` / `left`). Per the WAI-ARIA dialog pattern, every sheet MUST contain a `` so the accessible name is announced. Use `className="sr-only"` if the visible UI does not need a heading. Logical-property edges (`start-0` / `end-0`) ensure `left` and `right` automatically swap under `dir="rtl"`. ## Features - Four side anchors (`top`, `right`, `bottom`, `left`) with matching slide-in/slide-out animations. - Focus-trap on open; restore-focus on close (Radix-managed). - Escape closes; click on the overlay backdrop closes the sheet. - Translated close-button `aria-label` via `react-ui.sheet.close` (Close / 关闭 / إغلاق / Cau / Закрыть). - Theme-driven cva overrides for every slot via `useThemedVariants("Sheet")`. - All sub-components forward refs to their underlying Radix elements. - `motion-reduce:animate-none` collapses the slide animation under `prefers-reduced-motion: reduce`. - Logical-property anchoring (`start-0` / `end-0`) so `left` and `right` flip in RTL automatically. ## Usage: Basic Example ```tsx import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, } from "@suaveplan/react-ui"; export function FiltersSheet() { return ( Filters Filters Refine the results. Apply ); } ``` ## Usage: Advanced Example ```tsx import { Button, Sheet, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, } from "@suaveplan/react-ui"; import { useState } from "react"; interface NavItem { readonly id: string; readonly label: string; } export function MobileNavSheet({ items }: { items: readonly NavItem[] }) { const [open, setOpen] = useState(false); return ( Navigation Browse the app. ); } ``` ## API Reference ### `` Renders the Radix Dialog Root. Same lifecycle props as ``. ### `` | Prop | Type | Default | Description | |---|---|---|---| | `side` | `"top" \| "right" \| "bottom" \| "left"` | `"right"` | Anchor edge (RTL flips left/right). | | `closeAriaLabelKey` | `TranslationKey` | `react-ui.sheet.close` | Override the close-button accessible name. | ### `` REQUIRED — Radix surfaces a dev warning when omitted. Render `className="sr-only"` if no visible heading is needed. ### ``, ``, ``, ``, ``, ``, `` Same as Dialog's analogous sub-components — direct re-exports of the Radix sub-components with the chassis cva applied. ## Implementation Notes - The Radix Content props type is a discriminated union once cva-extra variant props (`side`) are layered on; TS cannot narrow the spread back through the chassis surface, so `` casts the Radix Content to a relaxed shape via `unknown`. The runtime accepts both shapes equivalently. This mirrors the Wave 3b ToggleGroup reconciliation finding and is documented in the implementation comment. - The chassis NEVER assigns a numeric `z-index` to the overlay or content — Radix portals handle stacking. - `start-0` / `end-0` are logical properties — `left` / `right` automatically swap in RTL without a chevron-flip step. - `motion-reduce:animate-none motion-reduce:transition-none` collapses both the slide and the duration transitions under `prefers-reduced-motion: reduce`. - `` self-portals via `` so consumers do not need to remember to portal manually — matches the shadcn upstream convention exactly.