Gestures & Cards5 min read
Gesture-Driven Physics Spring Bottom Sheet
Direct Definition & Architecture
A physics bottom sheet uses multi-target snap state machines to interpolate sheet elevation between collapsed, preview, and full-screen states. When dragged, it applies rubber-banding beyond limits and evaluates release velocity to snap to the most plausible intended state.
Live Physics Canvas
120 FPS GPU RenderStiffness (Tension)360
Damping (Friction)26
Technical Specifications
Snap States
Dismissed (0px), Preview (320px), Full (680px)
Fling Recognition
Velocity threshold > 500 px/s triggers next snap
Backdrop Integration
Continuous opacity interpolation with click dismiss
State Machine Graph
HiddenY-translation 100% offscreen.
Active DragFollows touch pointer with boundary resistance.
SnappingInterpolates to nearest snap target based on velocity vector.
Production Code Output
bottom-sheet.jsx
import React, { useState } from 'react';
import { motion, AnimatePresence } from 'framer-motion';
export function BottomSheet({ isOpen, onClose, children }) {
return (
<AnimatePresence>
{isOpen && (
<div className="fixed inset-0 z-50 flex items-end">
<motion.div
initial={{ opacity: 0 }}
animate={{ opacity: 1 }}
exit={{ opacity: 0 }}
onClick={onClose}
className="fixed inset-0 bg-black/50 backdrop-blur-sm"
/>
<motion.div
drag="y"
dragConstraints={{ top: 0, bottom: 0 }}
dragElastic={0.2}
onDragEnd={(e, { offset, velocity }) => {
if (offset.y > 150 || velocity.y > 400) {
onClose();
}
}}
initial={{ y: "100%" }}
animate={{ y: 0 }}
exit={{ y: "100%" }}
transition={{ type: "spring", stiffness: 360, damping: 26 }}
className="relative z-10 w-full max-w-xl mx-auto bg-white rounded-t-3xl p-6 shadow-2xl border-t border-stone-200"
>
<div className="w-12 h-1.5 bg-stone-300 rounded-full mx-auto mb-6" />
{children || <p className="text-stone-700">ExodeUI Physics Sheet Content</p>}
</motion.div>
</div>
)}
</AnimatePresence>
);
}Architectural Breakdown
Traditional modal sheets animate to static heights and freeze during gesture interaction.
An ExodeUI physics bottom sheet coordinates inner content scroll with boundary drag gestures.
Flinging downward snaps cleanly to the dismissed state without unnatural speed abruptness.
Frequently Asked Questions
Explore Related Motion Guides & Tooling
Build your next living interface today.
Design fluid physics and visual logic in ExodeUI and export directly to React, Swift, and Flutter.