A zero-dependency bottom sheet. Drag the markers to set snap points, then open the sheet.
pnpm add @alexapvl/drwr
Drag the handle to move this sheet. Flick down to close. Try the snap points.
import { Sheet } from "@alexapvl/drwr";
import "@alexapvl/drwr/style.css";
const sheet = new Sheet("#sheet", {
snapPoints: [0, 0.3, 0.6, 1],
defaultSnap: 0.6,
overlay: true,
dragHandle: true,
});
button.addEventListener("click", () => {
sheet.snapTo(0.6);
});