04.17 · Micro-Interactions

Drawer / Panel Slide

A side panel slides in over a dimmed page. Best for mobile menus.

Click it

Press the menu button, then close the drawer with × or a swipe, or press Show me.

Atlas App

Try it

Change a setting, then try it again or press Show me.

Slides in from

The edge the drawer comes in from.

Opening speed

It slows down as it arrives, like a panel landing.

Closing speed

It speeds up as it leaves, so closing feels quick.

More optionsFewer options

Page dimming

How dark the page behind the drawer gets.

Copy the prompt

Paste it into an AI assistant such as ChatGPT, Claude or Cursor to build this in your own project.

Add a slide-in drawer to [the menu or panel you want to open]. It waits just beyond one edge of the screen and slides in over the page when its button is pressed; when the settings include it, the page behind it dims. Let it slow down as it arrives, like a panel sliding to a stop, and speed up as it leaves, so closing feels quicker than opening. Close it with a close button, a tap on the page beside it, the Escape key or a swipe back toward its edge. Move only its position, and keep keyboard focus inside it while it is open. If the visitor has reduced motion turned on, show and hide it without sliding. Match the settings listed below.

Replace the words in brackets with your own element. Your settings are added at the end.

Free and open source. If this helped, a star on GitHub helps other people find it.

Star on GitHub

What it is

The full explanation is in README.md.

Good for

  • Mobile menus
  • Filters
  • Settings panels

Avoid on

  • Short messages
  • Main content