Components general

Drawer

Slide‑in side panel component with a trigger button. It slides from the left or right using a spring animation, includes an overlay backdrop, locks body scrolling, and supports keyboard accessibility. Ideal for detailed content panels, filter sidebars, navigation menus, and supplementary information.

Updated Mar 6, 2026

Drawer

Slide‑in side panel component with a trigger button. It slides from the left or right using a spring animation, includes an overlay backdrop, locks body scrolling, and supports keyboard accessibility. Ideal for detailed content panels, filter sidebars, navigation menus, and supplementary information.

Use Cases

  • Filter/sort panel in e‑commerce product listings
  • Navigation menu for mobile‑friendly layouts
  • Detailed information sidebar (product specs, user profiles)
  • Settings panel that slides in without leaving the page
  • Shopping cart preview sliding from right
  • Help/documentation sidebar

Properties

triggerLabel

Text on the button that opens the drawer. Type: string.

triggerVariant

Visual style of the trigger button. Type: string. Options: primary, secondary, outline, ghost. Default: primary

title

Title in the drawer header. Type: string.

content

Main content of the drawer. Supports line breaks with \n. Type: string.

side

Which side the drawer slides in from. Type: string. Options: left, right. Default: right

width

Drawer width: sm(320px), md(420px), lg(560px). Type: string. Options: sm, md, lg. Default: md

showCloseButton

Show X close button in header. Type: boolean. Default: true

overlayClose

Allow closing by clicking the backdrop. Type: boolean. Default: true

customCss

Custom CSS styles. Type: string.

Best Practices

  • Use side ‘right’ for content/detail panels (most common, user expectation)
  • Use side ‘left’ for navigation or filter panels
  • Keep width ‘sm’ for navigation/filters, ‘md’ for content, ‘lg’ for detailed views
  • Always include a title so users know the panel’s purpose
  • Use ‘outline’ or ‘ghost’ trigger for secondary panels to avoid visual clutter

Common Mistakes

Using Drawer when Modal would be more appropriate

Why it's a problem: Drawers are for side panels with scrollable content. Modals are for centered, focused messages.

Fix: Use Modal for short messages/confirmations. Use Drawer for longer content, navigation, or filter panels.

Tags

drawer sections filter/sort panel navigation menu detailed information

Related Components

Ready to build?

Start creating your app for free with Qödiak.

Get Started Free

Related Articles

AnimatedGradient

Smooth animated gradient background for modern, premium aesthetics. Supports linear and radial gradients with configurable colors, animation speed, and intensity. GPU‑accelerated for smooth 60fps performance.

Button

Interactive button component that supports link navigation, page data source operations (record navigation, new record, mode switching), form submission, and custom JavaScript execution. Save/Delete actions must use a custom‑script with navigation. Two visual variants are available, and the button can be enabled or disabled dynamically based on data context.

Calendar

A full‑featured calendar component built with react‑big‑calendar. It can display events in month, week, day, or agenda views and includes navigation and view‑switching capabilities, making it suitable for any site that needs scheduling, event management, or date visualization.

Card

Feature card component with an icon, title, description, and entrance animations. Ideal for showcasing features, services, or benefits in grid layouts with animation support.

Checkbox

A checkbox group component that lets users select multiple options from a predefined list. It renders a set of checkboxes with individual labels and can be arranged vertically or horizontally.

CountdownTimer

Real-time countdown timer component that displays the time remaining until a target date/time. It updates every second, offers customizable formatting, and shows a completion message when the countdown ends. Suitable for any site type.