Modal/Popup Windows Implementation for Website

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Our competencies:

Development stages

Latest works

  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1262
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1171
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    874
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1094
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    831
  • image_bitrix-bitrix-24-1c_fixper_448_0.png
    Website development for FIXPER company
    851

Implementing Modal/Popup on Website

Modal windows have many hidden problems: focus management, scroll behind modal, z-index conflicts, animations, mobile keyboard shift. Native <dialog> solves most without JS.

Native <dialog>: Correct Foundation

Modal with showModal() blocks background via ::backdrop. Use createPortal for React. Close on Escape or backdrop click. Focus trap built-in.

import { useEffect, useRef, ReactNode } from 'react'
import { createPortal } from 'react-dom'

export function Modal({
  isOpen, onClose, title, children,
  size = 'md',
  closeOnBackdrop = true,
}: ModalProps) {
  const dialogRef = useRef<HTMLDialogElement>(null)

  useEffect(() => {
    const dialog = dialogRef.current
    if (!dialog) return

    if (isOpen) {
      dialog.showModal()
      document.body.style.overflow = 'hidden'
    } else {
      dialog.close()
      document.body.style.overflow = ''
    }
  }, [isOpen])

  return createPortal(
    <dialog ref={dialogRef} className={`modal modal--${size}`}>
      <div className="modal__content">
        {title && <h2 className="modal__title">{title}</h2>}
        <div className="modal__body">{children}</div>
      </div>
    </dialog>,
    document.body
  )
}

CSS animation for modal entrance and exit with smooth transitions.

Focus Trap

Keep focus inside modal during interaction. Native dialog handles this automatically.

Bottom Sheet for Mobile

Position fixed from bottom with safe-area inset adjustment for iOS.

Timeline

Basic modal with animation — 3–4 hours. React component with portal, focus trap — 1 day. Full system with confirm/alert API, stack support — 1.5–2 days.