# @surdeddd/bottom-sheet ยท Vue 3 Vue 3.2+ adapter. Ships a `` SFC and a `useBottomSheet()` composable for headless control. Mirrors the React adapter API. ## Install ```bash npm i @surdeddd/bottom-sheet vue ``` ## Component ```vue ``` ## Composable ```ts import { useBottomSheet } from "@surdeddd/bottom-sheet/vue"; const { sheetRef, handleRef, contentRef, state, snapTo, close } = useBottomSheet({ snapPoints, animation: "spring" }); ``` ## Slots | Slot | Purpose | | --- | --- | | `header` | Drag-handle content | | (default) | Scrollable content | | `leftButton` / `rightButton` | Buttons docked above the sheet | | `screen` | Background that fades in by progress | ## Events | Event | Payload | | --- | --- | | `change` | `EngineState` (settled state) | | `snap` | `id: string` | | `open` | `id: string` | | `close` | โ€” | ## One-shot construction `useBottomSheet(opts)` reads `opts` once on mount. Changes to `opts.snapPoints` / `opts.allowed` / `opts.mode` after the composable has mounted have **no effect** โ€” the engine doesn't auto-track reactive props. For runtime updates, use the setters returned from the composable: ```vue ``` Engine recreation (changing `mode`, `animation`, `focusTrap`) requires a `v-if` toggle so the composable re-runs. ## Nuxt 3 / SSR The composable wraps `onMounted` so the engine attaches only on the client. No `window` access at import. SSR pages render the static HTML; gestures activate after hydration.