LayerwiseLayerwise
  • Features
  • Pricing
  • Templates
  • Docs
DownloadDownload
FeaturesPricingTemplatesDocsAI Website BuilderVibe CodingPersonal Software
DownloadDownload
  1. Glossary
  2. /
  3. Components

Drawer

Also called bottom sheet, side panel, or slide-over

A panel that slides in from the edge of the screen, usually the bottom on phones or the side on desktop, to show extra content or options.

import { Drawer } from '@base-ui/react/drawer';

const FILTERS = ['Paid', 'Pending', 'Refunded', 'Shipped this week'];
// A strong ease-out: the sheet leaves fast and settles softly.
const SLIDE = 'duration-400 ease-[cubic-bezier(0.23,1,0.32,1)]';

export function OrderFiltersSheet() {
  return (
    <Drawer.Root>
      <Drawer.Trigger className='rounded-lg border px-4 py-2 text-sm font-medium hover:bg-muted'>
        Filters
      </Drawer.Trigger>
      <Drawer.Portal>
        <Drawer.Backdrop
          className={`fixed inset-0 bg-black/40 opacity-[calc(1-var(--drawer-swipe-progress))] transition-opacity ${SLIDE} data-ending-style:opacity-0 data-starting-style:opacity-0 data-swiping:duration-0`}
        />
        <Drawer.Viewport className='fixed inset-0 flex items-end justify-center'>
          {/* Base UI follows the drag: past its distance or speed threshold
              the sheet closes, otherwise it springs back into place. */}
          <Drawer.Popup
            className={`w-full max-w-lg translate-y-(--drawer-swipe-movement-y) rounded-t-2xl border-t bg-background px-6 pt-3 pb-8 outline-none transition-transform ${SLIDE} data-ending-style:translate-y-full data-starting-style:translate-y-full data-swiping:duration-0 motion-reduce:transition-none`}
          >
            <div className='mx-auto mb-4 h-1.5 w-10 rounded-full bg-muted' />
            <Drawer.Content>
              <Drawer.Title className='text-base font-semibold'>
                Filter orders
              </Drawer.Title>
              <div className='mt-4 flex flex-col gap-3'>
                {FILTERS.map((filter) => (
                  <label
                    key={filter}
                    className='flex items-center gap-3 text-sm'
                  >
                    <input type='checkbox' className='size-4 accent-blue-600' />
                    {filter}
                  </label>
                ))}
              </div>
              <Drawer.Close className='mt-6 h-11 w-full rounded-lg bg-primary text-sm font-medium text-primary-foreground'>
                Show results
              </Drawer.Close>
            </Drawer.Content>
          </Drawer.Popup>
        </Drawer.Viewport>
      </Drawer.Portal>
    </Drawer.Root>
  );
}
Show the order filters in a bottom sheet on mobile: slide it up over 400ms with cubic-bezier(0.23, 1, 0.32, 1), dim the page behind it, and add a grab handle. Close it when it is dragged down more than 60px or flicked faster than 400px/s, and snap it back otherwise. On screens wider than 768px, slide the same panel in from the right as a 380px side panel. Close it on Escape or a backdrop tap.

Paste into Layerwise or any AI coding tool.

What is Drawer?

A drawer slides in from one edge and covers part of the page, so people keep a sense of where they are. On phones it usually rises from the bottom as a sheet with a small grab handle, and you can drag it down to close it. On larger screens it often slides in from the right as a full-height panel.

Use a drawer for content that is bigger than a popover but still belongs to the current page: filters, a shopping cart, the details of a row, or navigation on mobile. When people only need to make one quick decision, a modal is simpler.

Make it feel physical. Slide it in with a strong ease-out over about 300 to 450ms, fade the backdrop with it, and close it when a drag passes a threshold or ends in a quick flick. Like a modal, it should keep focus inside while open, close on Escape, and fade instead of sliding for people who prefer reduced motion.

Often confused with

Modal
A modal opens in the center for a short decision. A drawer slides in from an edge and holds longer content while the page stays partly visible.
Sidebar
A sidebar stays on screen as part of the layout. A drawer slides in on demand and closes again.

Related terms

All terms

Modal

A window that opens over the page, dims everything behind it, and blocks the rest of the interface until you finish or dismiss it.

Drag gesture

Moving an element by pressing on it and sliding the pointer or finger, usually within set bounds and with a glide after release.

Swipe to dismiss

A gesture where you drag an item sideways past a threshold to remove it, while a shorter swipe lets it spring back into place.

Sidebar

A vertical panel along the side of an app that holds the main navigation, often collapsible to a slim strip of icons.

Build it with Layerwise

Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.

DownloadDownloadRead the docs
LayerwiseLayerwise

Build full-stack web apps in minutes with AI.

Product

  • Features
  • Pricing
  • Download
  • Templates

Solutions

  • AI Website Builder
  • Vibe Coding
  • Personal Software

Resources

  • Documentation
  • Changelog
  • Blog
  • Vibe Coding Glossary
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact

Legal

  • Privacy
  • Analytics Privacy
  • Terms
  • Security
  • Abuse

© 2026 Layerwise. All rights reserved.

Entrances & exits

  • Fade in
  • Slide in
  • Scale in
  • Pop in
  • Blur in
  • Reveal animation
  • Enter and exit animations

Timing & sequencing

  • Duration
  • Delay
  • Keyframes
  • Tweening
  • Stagger
  • Orchestration
  • Fill mode
  • Stepped animation
  • Looping animation
  • Yoyo animation

Easing

  • Easing
  • Linear easing
  • Ease-in
  • Ease-out
  • Ease-in-out
  • Cubic-bezier
  • Asymmetric easing
  • Overshoot easing

Springs & physics

  • Spring animation
  • Stiffness
  • Damping
  • Mass
  • Bounce
  • Velocity
  • Momentum
  • Interruptible animation
  • Rubber-banding

Transforms

  • Translate
  • Scale
  • Rotate
  • Skew
  • 3D flip
  • Perspective
  • Transform origin
  • Origin-aware animation

State transitions

  • Crossfade
  • Morph
  • Shared element transition
  • Layout animation
  • Height auto animation
  • Direction-aware transition
  • Continuity transition
  • Page transition
  • View Transitions API

Scroll effects

  • Scroll reveal
  • Scroll-driven animation
  • Parallax scrolling
  • Scrollytelling
  • Scroll pinning
  • Horizontal scroll section
  • Scroll progress bar
  • Scroll snap
  • Smooth scrolling

Interaction feedback

  • Hover effect
  • Press feedback
  • Ripple effect
  • Shake animation
  • Hold to confirm
  • Drag gesture
  • Drag to reorder
  • Swipe to dismiss
  • Pull to refresh
  • Magnetic button
  • Custom cursor
  • 3D tilt card
  • Spotlight card

Text effects

  • Typewriter effect
  • Text scramble
  • Split text animation
  • Text morph
  • Rotating words
  • Gradient text
  • Shimmer text
  • Number ticker
  • Tabular numbers
  • Underline animation

Loops & ambient motion

  • Marquee
  • Pulse animation
  • Float animation
  • Orbit animation
  • Idle animation
  • Particle background
  • Border beam
  • Confetti
  • Animated gradient

Visual effects

  • Blur
  • Clip-path
  • Mask
  • Before/after slider
  • SVG line drawing
  • Lottie animation

Motion principles

  • Purposeful animation
  • Anticipation
  • Follow-through
  • Squash and stretch
  • Perceived performance
  • Frequency of use
  • Spatial consistency
  • Reduced motion

Animation performance

  • Frame rate (FPS)
  • Jank
  • GPU acceleration
  • will-change
  • Layout thrashing

Layout

  • Hero section
  • Above the fold
  • Sticky header
  • Sidebar
  • Bento grid
  • Card
  • Flexbox
  • CSS Grid
  • Padding vs margin
  • Responsive design
  • Container
  • Masonry layout
  • Split screen
  • Z-index
  • Overflow

Components

  • Button variants
  • Modal
  • Drawer
  • Popover
  • Tooltip
  • Dropdown menu
  • Context menu
  • Toast notification
  • Tabs
  • Segmented control
  • Accordion
  • Carousel
  • Command palette
  • Combobox
  • Toggle switch
  • Checkbox
  • Radio button
  • Date picker
  • Breadcrumb
  • Pagination
  • Infinite scroll
  • Badge
  • Avatar stack
  • Empty state
  • Skeleton screen
  • Spinner
  • Progress bar
  • Data table
  • Stepper
  • Floating label
  • Inline validation
  • Alert banner
  • Tag input

States & patterns

  • Interaction states
  • Focus ring
  • Loading state
  • Optimistic UI
  • Debounce
  • Lazy loading
  • Dark mode
  • Micro-interaction
  • Affordance
  • Undo
  • Drag and drop
  • Keyboard shortcut

Visual styles

  • Glassmorphism
  • Liquid glass
  • Neumorphism
  • Claymorphism
  • Neo-brutalism
  • Skeuomorphism
  • Flat design
  • Mesh gradient
  • Aurora background
  • Grain texture
  • Glow effect
  • Drop shadow
  • Border radius
  • Grid background
  • Typographic hierarchy
  • Accent color
  • Color contrast

Vibe coding & AI

  • Vibe coding
  • Prompt
  • Context window
  • Token
  • AI agent
  • Tool call
  • Hallucination
  • Diff
  • Live preview
  • Checkpoint
  • Git commit
  • Deploy
  • Frontend and backend
  • API
  • Database
  • Rules file
  • MCP
  • Plan mode
  • Visual edit
Orders
  • Order #1042
  • Order #1041
  • Order #1040
  • Order #1039