Rendyn

Component library

189 components

Interaction

Bottom Sheet

Bottom Sheet exposes controlled open state and a set of viewport-relative or automatic snap points.

Interactive exampleReact Tailwind CSS

Practical React example

Present a small set of record actions in a mobile-friendly sheet.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/motion/bottom-sheet.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, motion, react, react-dom, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Present a small set of record actions in a mobile-friendly sheet

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";

import { useState } from "react";
import { BottomSheet } from "@/components/motion/bottom-sheet";

export function BottomSheetPreview() {
  const [open, setOpen] = useState(false);
  return (
    <>
      <button
        type="button"
        onClick={() => setOpen(true)}
        className="inline-flex h-10 items-center rounded-full border border-border bg-card px-5 text-sm font-medium text-foreground press hover:border-(--color-border-strong)"
      >
        Open bottom sheet
      </button>
      <BottomSheet
        open={open}
        onOpenChange={setOpen}
        snapPoints={[0.4, 0.85]}
        title="Quick actions"
        description="Drag the handle, fling, or swipe down to dismiss."
      >
        <ul className="divide-y divide-border">
          {["Share", "Duplicate", "Move to folder", "Rename", "Archive", "Delete"].map((item) => (
            <li key={item} className="py-3 text-sm text-foreground">{item}</li>
          ))}
        </ul>
        <div className="py-12 text-center text-xs text-muted-foreground">
          Fling up to expand, fling down to dismiss.
        </div>
      </BottomSheet>
    </>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Own open in the parent and make closing return the person to a sensible trigger. Choose snap points that leave the main action reachable when the keyboard is visible.

Customization

BottomSheetProps.open
Required; boolean.
BottomSheetProps.onOpenChange
Required; (open: boolean) => void.
BottomSheetProps.snapPoints
Optional; (number | "auto")[]. Heights (0-1 = fraction of viewport, or "auto"). First entry is default.
BottomSheetProps.defaultSnap
Optional; number.
BottomSheetProps.title
Optional; string.
BottomSheetProps.description
Optional; string.
BottomSheetProps.children
Optional; ReactNode.
BottomSheetProps.className
Optional; string.
BottomSheetProps.dismissThreshold
Optional; number. Min drag distance (px) past current snap to dismiss.
PresenceGateRenderProps.isPresent
Required; boolean. False from the render that starts the exit animation onward. An overlay kept in the tree by `AnimatePresence` is still the topmost thing on the page, so anything it decides from `open` alone stays true for the whole exit — this is the boolean that already knows the overlay is leaving.
PresenceGateRenderProps.gate
Required; { inert: boolean; style: { pointerEvents: "auto" | "none" }; }. Spread onto every layer that takes pointer events while the overlay is open. Interaction releases in the same commit that starts the exit while the visual exit keeps playing: pointer events stop landing, and `inert` drops the subtree from focus order, from tab order and from the accessibility tree — an exiting dialog is not a dialog you can still type into. A layer that never takes pointer events (a wrapper that only centres the panel) takes `inert={!isPresent}` alone, so its own `pointer-events-none` is not overwritten.
PresenceGateProps.children
Required; (props: PresenceGateRenderProps) => ReactNode.

Integration notes

  • Opening a sheet does not validate or save its form.
  • Test focus, scroll containment, dismissal and safe-area padding on an actual narrow viewport.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP