# Alert

Renders an assertive alert region without moving focus.

## Signatures

```ts
export declare function Alert<const Options extends AlertOptions, const Host extends HostResult = never>(options: Options, host?: Dom.HostOverride<Dom.RenderHostProps<Options, AlertInternalProps>, Options["content"], Host>): Fx<RenderEvent, Renderable.Error<Options | Host>, Renderable.Services<Options | Host> | Scope.Scope | RenderTemplate>;
```



## Examples

```ts
import { RefSubject } from "@typed/fx";
import { html } from "@typed/template";
import { Alert } from "@typed/ui/Alert";
import { Button } from "@typed/ui/Button";
import { component } from "@typed/ui/Component";

export const AlertPreview = component(function* () {
  const message = yield* RefSubject.make("");
  return html`<section>
    <p>Preview the message shown when an upload fails.</p>
    ${Button({
      content: "Preview upload failure",
      onclick: RefSubject.set(message, "Upload failed. Your file is still available; try again."),
    })}
    ${Alert({ content: message, props: { class: "upload-alert" } })}
  </section>`;
});
```
