Modal • Concept Alpha

A high-fidelity modal overlay component with focus-trapping, backdrop interactions, and Indigo-themed buttons.

Indigo Theme React Portal WCAG AAA

Interactive Explorer

Modal Component

Component Anatomy

Parts & Properties

Backdrop Overlay

Semi-transparent surface that dims the background and captures clicks to close.

Modal Header

Contains the title and close action, with clear separation from the body.

Content Body

The primary scrollable area for information, forms, or interaction data.

Action Footer

Sticky bottom area for primary and secondary Indigo-themed actions.

Development Resources

// ExperimentModal.tsx
const ExperimentModal = ({ isOpen, onClose, title, children }) => {
  if (!isOpen) return null;
  return createPortal(
    <div className="fixed inset-0 z-50 flex items-center justify-center">
      <div className="absolute inset-0 bg-black/40" onClick={onClose} />
      <div className="relative bg-white rounded-2xl shadow-2xl w-full max-w-lg">
        <header className="p-4 border-b"><h3>{title}</h3></header>
        <div className="p-6">{children}</div>
      </div>
    </div>,
    document.body
  );
};