# RouteDialog

> A dialog whose open state is the page's address: the server renders it open when the address names it (`?edit=42`), so it can be linked to, reloaded and opened without script.

```ts
import { RouteDialog } from "@sdxc/ui/app";
```

Renders the dialog open, over a full-screen link back to the page without it. Without script
the dialog sits fixed in the middle of the screen and the backdrop link closes it; with
script it becomes modal, traps focus and closes on Escape.

## Examples

```tsx
<RouteDialog id="edit-event" closeHref="/week" closeLabel="Close" aria-labelledby="edit-title">
	<form method="post" action="/events/42">…</form>
</RouteDialog>
```

## Props

| Prop | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `closeHref` | `string` | The page's address without the dialog, which closing it navigates to. |
| `closeLabel` | `string` | The close link's name, such as "Close". |

Also accepts everything in `Dialog.Props`.

