Skip navigation
📢 Introducing the React Aria Sheet component!
0:00 / 0:29

📢 Introducing the React Aria Sheet component!

Devon Govett

@devongovett44K followers

Visit on X
807 likesDownloadOriginal post

54,406 views

📢 Introducing the React Aria Sheet component! ‣ Native swipe gestures powered by CSS scroll snapping ‣ Gesture-synced animations ‣ Snap points ‣ Stacking ‣ Elastic over-scroll ‣ Keyboard aware Wrote a blog post about how it works!

36 Comments

Comments from the original post on X (Twitter)

  • Devon Govett's profile picture

    @devongovett

    Also in this release: Improved overlay positioning with software keyboard, Turbopack optimize locales plugin, and plenty of bug fixes. Thanks to everyone who contributed! 😍

    11 likes

  • Teemu Sirkiä's profile picture

    @ttsirkia

    Looks great! Any suggestions how to create, for example, a trigger which would use Sheet on mobile devices but Dialog when using a normal size screens?

    4 likes

  • Devon Govett's profile picture

    @devongovett

    Thanks! Maybe a wrapper component with a media query? let isDesktop = useMediaQuery("(width >= 768px)") return isDesktop ? <DialogTrigger /> : <SheetTrigger />

  • Teemu Sirkiä's profile picture

    @ttsirkia

    That could be one option. I guess that in most contexts the Sheet contents would work fine in Dialog when using a larger screen. Sheet does not feel a natural component/pattern outside the mobile world.

  • Peter Emad's profile picture

    @peteremad944

    @devongovett Side shees feels good on desktops

  • Teemu Sirkiä's profile picture

    @ttsirkia

    @devongovett Yes, that’s true. Using ”right” for the position works very well in that context.

  • Max Schmitt 🍰's profile picture

    @Mackseraner

    Amazing job, the sheet feels really great! Thanks for the write-up. Very interesting to see how you used scroll-snap and timeline animations for this. Did you have to do any special magic to deal with iOS Safari's address bar?

    2 likes

  • Devon Govett's profile picture

    @devongovett

    Thanks! Yes I sure did. 😅 We make heavy use of dynamic viewport units, and also add some extra padding so you can swipe the sheet fully off the screen even behind the toolbar.

    4 likes

  • Max Schmitt 🍰's profile picture

    @Mackseraner

    Uff, this damn address bar 😅

  • Mike Solomon's profile picture

    @solomania

    This is extremely impressive!

    2 likes

  • Tobias Möritz's profile picture

    @tobimori

    nice, finally i can throw out my custom code for this

    1 like

  • sqrtsanta's profile picture

    @sqrtsanta

    Holy moly, that's some marvelous engineering. ngl I continue to use react only because it has react-aria

    1 like

  • JWWW's profile picture

    @josiahwiebe

    this is very nice! brb migrating from vaul

    1 like

  • Jeff Rosen's profile picture

    @jeffrosen

    Snap points feature is beautiful

    1 like

  • Jason Gerbes's profile picture

    @JasonGerbes

    Great work! Impressive use of modern CSS

    1 like

  • 🇺🇾 Emilio Franceschini's profile picture

    @emoporemilio

    sweet

  • Daniel Kempner's profile picture

    @DanielKempner

    Holy grail component.

  • Juliano Santos's profile picture

    @itsme_juliano

    Let me see if I understand correctly: Shadcn Drawer will be based on RAC Sheet, while Shadcn Sheet is based on RAC Dialog? 😅

  • Daniel's profile picture

    @ogdakke

    Great work. Feels silky. base-ui could take some inspo from here

  • Roman's profile picture

    @Rodych

    looks perfect 😍