Back to marketplace
Modal Dialog
Modal built on the browser native dialog element
Overlaysmodaldialognativefocus-trapa11y
Code locked
"use client"; import { useRef } from "react"; export function ModalDialog() { const ref = useRef<HTMLDialogElement>(null); return (
Sign in to see the code
Create a free account to copy the full source, usage snippet and AI prompt of every component.
Free — no card required.
Related components
Trigger a toast above.
Toast Stack
Overlays · Toast notifications in three tones
Keyboard focus shows it tooKeyboard focus shows it too
Tooltip
Overlays · Tooltip on hover and on keyboard focus

