Launch price: lifetime access for $149, $199 after

Dialog

Radix dialog with the Layro motion and a title the component insists on, so a screen reader always announces what opened. ConfirmDialog handles the destructive case: an alertdialog, an optional type-to-confirm, and a Promise-aware action that shows its own pending state.

OverlaysFree249 lines · one file

The decision inside it

Clicking the backdrop does not destroy a form

A dialog holding typed input closes on Escape or the button, not on a stray click outside it.

Installation

How you get it

One command. The CLI writes the file into components/ui/ and installs what it needs.

npx shadcn@latest add https://layropro.com/r/dialog

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
titlerequiredReact.ReactNodeRendered as the dialog's accessible name. Required — use `hideTitle` if the design has no visible title.
descriptionReact.ReactNodeOne or two sentences: what happens, and what it affects.
hideTitlebooleanKeep the title for screen readers only.
sizekeyof typeof WIDTH—
showClosebooleanShow the × in the corner. Default true.

Dependencies

npm packages

@radix-ui/react-dialogclsxlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-themebutton

Lifetime access

Every component, and everything we ship next.

  • All 65 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in Overlays