Skip to content

show modal as bottom sheet for mobile - #2527

Merged
chaitanyapotti merged 4 commits into
masterfrom
feat/modal-bottom-sheet
Jul 22, 2026
Merged

show modal as bottom sheet for mobile#2527
chaitanyapotti merged 4 commits into
masterfrom
feat/modal-bottom-sheet

Conversation

@lionellbriones

@lionellbriones lionellbriones commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Jira Link

https://consensyssoftware.atlassian.net/browse/EMBED-445

Description

Makes the modal render as a full-width slide-up bottom sheet on small screens and revert to a centered, fixed-width dialog at the xs breakpoint and above. Also smooths the enter/exit transition so content no longer disappears abruptly as the modal animates closed.

Changes

  • Modal.tsx — responsive bottom sheet
    • center placement anchors to the bottom (items-end) on small screens and centers (xs:items-center) at xs+
    • Modal panel is full-width on mobile (w-full) and switches to a fixed xs:w-[393px] at xs+ (previously two width tiers of 356px / 393px)
    • Rounds only the top corners on mobile (rounded-t-*) and all corners at xs+, matching a bottom-sheet look
    • Shadow steps from shadow-xl on mobile to xs:shadow-lg at xs+
  • Modal.tsx — enter/exit animation
    • Adds an isMounted state so the modal stays mounted through a 500ms slide-down/fade-out before unmounting
    • Switches the animation to combined translate-y-full + opacity-0 transitions with ease-out
    • Preserves the last non-empty children in renderedChildren so content remains visible during the exit animation instead of vanishing when the parent clears it
    • Cleans up pending timers on effect teardown to avoid stray state updates

How has this been tested?

Screenshots (if appropriate)

Before

web3auth-modal-responsive-animation.mov

After

Desktop and mobile modal

web3auth-modal-responsive-animation-after.mov

Bottom sheet login

Screen.Recording.2026-07-21.at.11.03.04.PM.mov

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the code style of this project. (run lint)
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Note

Cursor Bugbot is generating a summary for commit fd61cbd. Configure here.

@vercel

vercel Bot commented Jul 21, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web3auth-web Ready Ready Preview, Comment Jul 21, 2026 3:05pm

Request Review

@lionellbriones
lionellbriones marked this pull request as ready for review July 21, 2026 14:43
@lionellbriones
lionellbriones requested a review from a team as a code owner July 21, 2026 14:43

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fd61cbd. Configure here.

Comment thread packages/modal/src/ui/components/Modal/Modal.tsx
Comment thread packages/modal/src/ui/components/Modal/Modal.tsx Outdated
@chaitanyapotti
chaitanyapotti merged commit a2a8269 into master Jul 22, 2026
7 checks passed
@chaitanyapotti
chaitanyapotti deleted the feat/modal-bottom-sheet branch July 22, 2026 09:16
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.

2 participants