Loading
Loading
Loading
mobile footer

Build the Interaction Layer Your Website is Missing.

Browse All EffectsBrowse All EffectsBrowse All EffectsUpgrade to ProUpgrade to ProUpgrade to Pro

80+ effects free, forever. No credit card.

© 2026 Hyperiux. All Rights Reserved.

AI Component CatalogueHey AI, Learn About Us
Platform

Vault

  • Documentation
  • Pricing
  • Blog
  • Community
  • NPM
  • MCP

Categories

  • All Effects
  • WebGL
  • Text
  • Backgrounds
  • Buttons
  • Carousels
  • Scroll
  • Components
  • Navigation
  • Cursor
  • Transitions
  • Loaders

Documents

  • Introduction
  • Installation
  • CLI
  • Dependencies
  • License

Legal

  • License Agreement
  • Terms of Service
  • Privacy Policy
  • Refund Policy
Socials
  • Twitter / X
  • LinkedIn
  • GitHub
  • Instagram
Contact Us
  • hello@hyperiux.com
New effects, in your inbox

Every new drop, plus the occasional behind-the-scenes build. No spam. Unsubscribe anytime.

Loading
Home/Drawer Component

Drawer Component

An animated drawer with edge-based entrances, swipe-to-dismiss gestures, elastic movement, and staggered content transitions.

@base-ui/reactclass-variance-authoritymotiontailwind-merge
DemoDemoDemo

Tune the Real Props

Overview

Drawer reveals a panel from the screen edge instead of opening a new page or a centred dialog, so users always know where it came from. It can slide in with elastic settling or fade in, with its content following in a staggered fade.


Theme and Interaction Customisation

Choose side or bottom placement, a swipe handle, and an optional shrink-and-round effect on the page behind. Interaction settings include slide or fade opening, Elastic, Duration, Bounce, Stagger, and Tilt on swipe.


Example Production Use Case

A coffee store can open a bottom drawer to choose a roast profile. It slides up with a light elastic settle, options fade in one by one, and the product page shrinks slightly behind it.

A SaaS dashboard can use a side drawer for account settings, letting users adjust preferences while their workspace stays visible and closes with a clear button or Escape.

A mobile checkout can use a swipeable bottom drawer for delivery options, with a visible handle and a gentle tilt as users drag it down to dismiss.


Best Used For

  • Ecommerce product configuration.
  • SaaS account settings.
  • Shopping and checkout workflows.
  • Productivity applications.
  • Content management systems.
  • Interactive product interfaces.

Not For

A task that fits a simple inline control doesn’t need a drawer, and long multi-page workflows belong on their own page.

Avoid it when users must compare drawer content with what the panel covers, or when critical confirmations need an explicit decision rather than a swipe.


Performance Budget

Use transforms for sliding and tilt, keep gesture tracking local to the drawer, and avoid page-wide layout work on each pointer move. Keep elastic movement and stagger restrained, and sync the background shrink with the drawer.


Accessibility and Mobile

Use dialog semantics for modal drawers, with an accessible name, focus moved inside, an inert background, and focus restored on close, or region semantics for non-modal panels. Always provide a close button and Escape, not just swipe. On mobile, fit the viewport and keyboard and keep scrolling from triggering dismissal. With reduced motion, remove travel, overshoot, tilt, and background scaling.


Common Mistakes

  • Treating every drawer as a modal.
  • Making swipe the only way to dismiss.
  • Applying Bounce to fade entrances.
  • Making content appear too late.
  • Confusing scrolling with dismissal.
  • Assuming the background shrinks automatically.
  • Overusing tilt and bounce.

Changelog

v1.0.0

Oct 23, 2026
Initial release

API Reference

PropTypeDefaultDescription
themestringspotifyColour palette, drawer included. Its primary colour fills the main button and the hover fill.
modestringdarkLight or dark version of the palette. Starts dark.
rollingTextbooleantrueThe trigger and button labels roll to a second copy on hover.
fillOnHoverbooleanfalseButtons fill with colour from the edge on hover.
sidestringbottomWhich edge of the screen the drawer slides in from.
showSwipeHandlebooleantrueShows a handle you can grab to swipe the drawer away.
openAnimationstringslideHow the drawer arrives: slides in or fades in.
elasticbooleantrueThe drawer springs in with a slight overshoot.
durationnumber0.5How long the open animation takes, in seconds.
bouncenumber0.2How much the drawer overshoots and settles. 0 is no bounce.
staggernumber0.04Delay between each piece of drawer content appearing, in seconds.
tiltOnSwipebooleanfalseThe drawer tilts slightly as you swipe it.
scaleBackgroundbooleantrueThe page behind shrinks a little while the drawer is open.

Questions, Answered.

What is Drawer?

Drawer is an animated React component that opens a panel from the screen edge, with sliding or fading entrances, elastic movement, swipe dismissal, staggered content, and optional background scaling.

Does Drawer support swipe-to-dismiss?

Yes. Users drag it back toward its opening edge to close it, following the configured placement.

Does Drawer support content scrolling?

It can contain scrolling content, but verify scroll and gesture handling in the shipped implementation so scrolling never dismisses the panel.

Does Drawer automatically save changes when it closes?

No. Saving preferences, submitting forms, and updating records need separate application logic.

Is Drawer accessible?

It can be, with correct panel semantics, labels, keyboard-operable dismissal, predictable focus, and correct background interaction.

Can Drawer be used on mobile?

Yes. It needs suitable touch targets, viewport-aware sizing, and scrolling that doesn’t conflict with swipe dismissal.

View MoreView More

Request a Custom Animation

Need a custom effect? Tell us what to create.

Related Effects

Explore All EffectsExplore All EffectsExplore All Effects
Command Component
@base-ui/reactclass-variance-authoritycmdk

Command Component

Components

Questionnaire Component
@base-ui/reactclass-variance-authoritymotion

Questionnaire Component

Components

Hover Card Component
@base-ui/reactclass-variance-authoritylucide-react

Hover Card Component

Components

All Effects
Featured ComponentsText AnimationsAnimated BackgroundsAnimated ButtonsCarousel EffectsScroll EffectsCreative ComponentsNavigationsCursor EffectsTransitionsLoadersWebGL & 3D Effects
Templates
IntroductionInstallationCLIDependenciesLicense
PricingBlogGithubNPMMCP Doc