# dialogDismiss

> Closes the modal `<dialog>` its host sits in when the visitor presses the backdrop or follows a link inside it.

```ts
import { dialogDismiss } from "@sdxc/ui/mixins";
```

Listens on the host's closest `<dialog>` from insertion until removal. A modified click
or a `target="_blank"` link opens the page elsewhere and leaves the dialog open, since
the visitor who made it is still using it. A host outside any dialog does nothing.

## Signature

```ts
dialogDismiss(): MixinDescriptor<HTMLElement>
```

## Examples

```tsx
<dialog id="menu" closedby="any">
	<span hidden mix={[dialogDismiss()]} />
	<a href="/#pricing">Pricing</a>
</dialog>
```
