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

Dialog

Dialog is a box that overlay on the current page which force user interact with.

Basic

Basic usage of Dialog.

Size

Dialog allow us to input width & height to adjust the size of Dialog.

Disable Escape & backdrop click

We can disable escape key & backdrop click close by setting shouldCloseOnOverlayClick & shouldCloseOnEsc props.

Internal Scroll

Example of Dialog internal scroll.

Lock Scroll

We can lock window scroll by passing 'overflow-hidden to bodyOpenClassName

Custom dialog style

Example of Dialog custom style

Closable

Set closeable to false will hide Dialog close icon.

API

Dialog
PropDescriptionTypeDefault
widthDialog widthstring | number520
heightDialog heightstring | number-
isOpenWhether to display dialogbooleanfalse
styleStyle for dialog & backdropobject: { content: object, overlay: object }<-
contentClassNameClass name that append to Dialog contentstring-
portalClassNameClass name that append to Dialog portalstring-
bodyOpenClassNameClass name that append to body while Dialog is openstring-
htmlOpenClassNameClass name that append to html while Dialog is openstring-
overlayClassNameClass name for Dialog backdropstring-
appElementSetting external node to Dialog contentSafeHTMLElement | SafeHTMLCollection | SafeNodeList | SafeHTMLElement[]-
onAfterOpenCallback function after Dialog open(overlayElement: HTMLElement, contentElement: HTMLElement) => void-
closableWhether show Dialog close iconbooleantrue
onCloseCallback function after click on Dialog close icon(event: Event) => void-
onRequestCloseCallback function after Dialog close(event: Event) => void-
closeTimeoutMSTimeout speed during Dialog close(event: Event) => void150
shouldFocusAfterRenderBoolean indicating if the dialog should be focused after renderbooleantrue
shouldReturnFocusAfterCloseBoolean indicating if the dialog should restore focus to the element that had focus prior to its displaybooleantrue
preventScrollBoolean indicating if the dialog should use the preventScroll flag when restoring focus to the element that had focus prior to its displaybooleanfalse
shouldCloseOnOverlayClickWhether to close Dialog when the backdrop is clickedbooleantrue
shouldCloseOnEscWhether to close Dialog when esc key pressedbooleantrue
parentSelectorFunction that will be called to get the parent element that the dialog will be attached to() => document.body() => document.body
overlayRefDialog backdrop ref(node: Node) => void-
contentRefDialog content ref(node: Node) => void-
TABLE OF CONTENT
  • Basic
  • Size
  • Disable Escape & backdrop click
  • Internal Scroll
  • Lock Scroll
  • Custom dialog style
  • Closable