Skip to content

feat(core): Sheet — edge-anchored overlay panel with swipe-to-dismiss… - #3695

Closed
Prajwalraut29 wants to merge 1 commit into
meta:mainfrom
Prajwalraut29:sheet-component
Closed

Prajwalraut29 wants to merge 1 commit into
meta:mainfrom
Prajwalraut29:sheet-component

Conversation

@Prajwalraut29

Copy link
Copy Markdown
Contributor

… and overlay stack (RFC #3675)

Implements the Sheet component as specified in RFC #3675.

  • 4 sides (start/end/top/bottom) via the side prop
  • Modal (showModal) with scrim; non-modal (show) with hasScrim={false}
  • Entry/exit slide animation via @starting-style
  • Collapse-to-rail for non-modal side panels
  • Opt-in mobile swipe-to-dismiss via hasDragHandle
  • data-autofocus on open, focus restore on close
  • useOverlayStack hook for coordinated LIFO Escape dismissal
  • useSwipeToDismiss hook for mobile swipe gestures
  • Full doc.mjs with best practices and i18n
  • 5 Storybook stories: BottomSheet, Inspector, NonModal, TopSheet, Stacked
  • 43 tests covering all states and edge cases

… and overlay stack (RFC meta#3675)

Implements the Sheet component as specified in RFC meta#3675.

- 4 sides (start/end/top/bottom) via the side prop
- Modal (showModal) with scrim; non-modal (show) with hasScrim={false}
- Entry/exit slide animation via @starting-style
- Collapse-to-rail for non-modal side panels
- Opt-in mobile swipe-to-dismiss via hasDragHandle
- data-autofocus on open, focus restore on close
- useOverlayStack hook for coordinated LIFO Escape dismissal
- useSwipeToDismiss hook for mobile swipe gestures
- Full doc.mjs with best practices and i18n
- 5 Storybook stories: BottomSheet, Inspector, NonModal, TopSheet, Stacked
- 43 tests covering all states and edge cases
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

@Prajwalraut29 is attempting to deploy a commit to the Meta Open Source Team on Vercel.

A member of the Team first needs to authorize it.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jul 8, 2026
@cixzhang cixzhang added area:core needs:code-review High-risk change (new package/component/API) — needs human code review before merge needs:design-review Affects visuals — Design should review and removed area:core labels Jul 8, 2026
@github-actions github-actions Bot added community Authored by a community contributor (not on the eng/design team) and removed needs:design-review Affects visuals — Design should review labels Jul 11, 2026

@cixzhang cixzhang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this. At the moment the sheet spec isn't ready yet and I suspect it'll likely change significantly when it is ready.

@cixzhang cixzhang left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- sorry not ready yet --

@cixzhang

Copy link
Copy Markdown
Contributor

Thank you for this, @Prajwalraut29 — this is a genuinely strong implementation. Four sides, modal/non-modal, the @starting-style slide animation, the useOverlayStack LIFO-Escape primitive, swipe-to-dismiss, plus 43 tests and 5 stories is a lot of careful, high-quality work, and building it on the native <dialog> top layer was exactly the right foundation.

We've decided to take the Sheet/Drawer work in a different architectural direction, so I'm going to close this PR — I want to be transparent about why rather than leave it hanging:

  • After a design review across our internal component libraries, we're hardening the existing lab:Drawer to add sheet-mode affordances (grab handle, swipe-to-dismiss, snap points, safe-area, container mode) rather than introducing a separate Sheet component. Keeping one Drawer where side selects the physical model avoids duplicating the shared <dialog> foundation and matches how our migration sources (which need "same content, different presentation") actually consume it.
  • This is a fairly involved design effort with several open API questions we need to settle first, and it's being driven internally alongside a broader responsive-system project.

None of that is a reflection on the quality here — your useOverlayStack approach in particular is something we'll likely revisit. I really appreciate the effort and hope you'll pick up other issues; thank you for contributing to Astryx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. community Authored by a community contributor (not on the eng/design team) needs:code-review High-risk change (new package/component/API) — needs human code review before merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants