Ecme logoEcme logo
Dashboard
    Ecommerce
    Project
    Marketing
    Analytic
Network
    BGP
      Peer
      RTBH
DPI
    Overview
    Traffic Logs
    Analysis
      IP Analysis
      Domain Check
      nav.dpi.analysis.unmapped-asns
    Threats
      Blacklists
      nav.dpi.threats.feeds
    Configuration
      Senders
      Ignored Domains
Concepts
    AI
      Chat
      Image
    Projects
      Scrum Board
      List
      Details
      Tasks
      Issue
    Customer
      List
      Edit
      Create
      Details
    Products
      List
      Edit
      Create
    Orders
      List
      Edit
      Create
      Details
    Account
      Settings
      Activity log
      Roles & Permissions
      Pricing
    Help Center
      Support Hub
      Article
      Edit Article
      Manage Article
    Calendar
    File Manager
    Mail
    Chat
UI Components
    Common
      Button
      Grid
      Typography
      Icons
    Feedback
      Alert
      Dialog
      Drawer
      Progress
      Skeleton
      Spinner
      Toast
    Data Display
      Avatar
      Badge
      Calendar
      Cards
      Carousel
      Table
      Tag
      Timeline
      Tooltip
    Forms
      Checkbox
      Date Picker
      Form Control
      Input
      Input Group
      Radio
      Segment
      Select
      Slider
      Switcher
      Time Input
      Upload
    Navigation
      Dropdown
      Menu
      Pagination
      Steps
      Tabs
    Graph
      Charts
      Maps
Authentication
    Sign In
      Simple
      Side
      Split
    Sign Up
      Simple
      Side
      Split
    Forgot Password
      Simple
      Side
      Split
    Reset Password
      Simple
      Side
      Split
    Otp Verification
      Simple
      Side
      Split
Others
    Access Denied
    Landing
Guide
    Documentation
    Shared Component
    Utilities
    Changelog
Copyright © 2026 Ecme All rights reserved.
Term & Conditions | Privacy & Policy

Drawer

Drawer is a panel that slides out from the edge of the screen which containing supplementary content.

Basic

Basic usage of Drawer

Placement

Set the placement prop to 'top', 'right', 'bottom', or 'left' to arrange where the Drawer slide out from.

Width & Height

We can adjust Drawer via with height & width prop.

Footer

We can also have a footer under the Drawer.

Custom Style

Drawer allow us to set extra class via headerClass, bodyClass & footerClass

Closable

Set closeable to false will hide Drawer close icon.

API

Drawer
PropDescriptionTypeDefault
placementDrawer placement'top' | 'right' | 'bottom' | 'left' 'right'
widthDrawer width, (only available when placement is 'left' or 'right'string | number400
heightDrawer height, (only available when placement is 'top' or 'bottom'string | number400
titleTitle of Drawerstring | ReactNode-
footerFooter of Drawerstring | ReactNode-
headerClassExtra class for Drawer header (! modifier recommended for tailwind css overiding)string-
bodyClassExtra class for Drawer body (! modifier recommended for tailwind css overiding)string-
footerClassExtra class for Drawer footer (! modifier recommended for tailwind css overiding)string-
showBackdropWhether the display Drawer backdropbooleantrue
lockScrollWhether to disable window scrolling when Drawer is openbooleantrue
isOpenWhether to display Drawerbooleanfalse
styleStyle for Drawer & backdropobject: { content: object, overlay: object }-
portalClassNameClass name that append to Drawer portalstring-
bodyOpenClassNameClass name that append to body while Drawer is openstring-
htmlOpenClassNameClass name that append to html while Drawer is openstring-
overlayClassNameClass name for Drawer backdropstring-
appElementSetting external node to Drawer contentSafeHTMLElement | SafeHTMLCollection | SafeNodeList | SafeHTMLElement[]-
onAfterOpenCallback function after Drawer open(overlayElement: HTMLElement, contentElement: HTMLElement) => void-
closableWhether show Drawer close iconbooleantrue
onCloseCallback function after click on Drawer close icon(event: Event) => void-
onRequestCloseCallback function after Drawer close(event: Event) => void-
closeTimeoutMSTimeout speed during Drawer close(event: Event) => void300
shouldFocusAfterRenderBoolean indicating if the Drawer should be focused after renderbooleantrue
shouldReturnFocusAfterCloseBoolean indicating if the Drawer should restore focus to the element that had focus prior to its displaybooleantrue
preventScrollBoolean indicating if the Drawer should use the preventScroll flag when restoring focus to the element that had focus prior to its displaybooleanfalse
shouldCloseOnOverlayClickWhether to close Drawer when the backdrop is clickedbooleantrue
shouldCloseOnEscWhether to close Drawer when esc key pressedbooleantrue
parentSelectorFunction that will be called to get the parent element that the Drawer will be attached to() => document.body() => document.body
overlayRefDrawer backdrop ref(node: Node) => void-
contentRefDrawer content ref(node: Node) => void-
TABLE OF CONTENT
  • Basic
  • Placement
  • Width & Height
  • Footer
  • Custom Style
  • Closable