Skip to content

feat: per-transition motion, velocity on drag release and opaque content option - #10

Open
Guiw5 wants to merge 2 commits into
mainfrom
feat/sheet-motion
Open

Guiw5 wants to merge 2 commits into
mainfrom
feat/sheet-motion

Conversation

@Guiw5

@Guiw5 Guiw5 commented Oct 12, 2026 •

Copy link
Copy Markdown
Owner

Prototype. Not for merge yet: it is being measured against a consumer app first.

  • motion prop: { open, close, release, reduced }, each a Partial<SpringConfig> merged over springConfig.
  • release runs when a drag is let go (snap or swipe to dismiss) and gets the signed gesture velocity.
  • reduced fades the whole sheet in place when prefers-reduced-motion is set; without it the old instant jump stays.
  • presets.sheet: cubic-bezier(0.32, 0.72, 0, 1), 450ms open / 280ms close, critically damped release spring (tension 1000, friction 63), 150ms reduced fade.
  • fadeContent={false} keeps --rsbs-content-opacity at 1.
  • Backdrop max opacity is documented as the alpha of --rsbs-backdrop-bg.

Defaults are unchanged: without motion every transition is still the 115ms linear tween (covered by tests).

…ent option

Adds the motion prop (open, close, release, reduced), presets.sheet and fadeContent.
@Guiw5
Guiw5 force-pushed the feat/sheet-motion branch from 46a0a7e to 3d3825b Compare October 12, 2026 22:54
Reopening mid-close reverses from the current position. The sheet preset is now symmetric: 400 ms, closing on the opening curve played backwards.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant