# Backdrop

The backdrop component places an overlay over the drop of the entire page. It's useful for displaying loading states.

## Basic Backdrop

To create a basic backdrop, you can use the `New-UDBackdrop` cmdlet and include content to show within the backdrop. The content will be centered on the page. To show the backdrop, use the `-Open` switch parameter.

```powershell
New-UDBackdrop -Content {
    New-UDTypography -Text "Loading..." -Variant h2
} -Open
```

![Backdrop component](https://3638551245-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6jY7sXTmhiAIMGYw_m%2F-MT75ZfbBMSx2Q_nQz6I%2F-MT772Tw-Ce-gcRIbQ2i%2Fimage.png?alt=media\&token=51eba0b9-4317-42aa-bd98-88abcdbed842)

## OnClick Handler

The backdrop provides an `-OnClick` handler that you can use to close the backdrop when clicked. You can use `Set-UDElement` to open and close the backdrop.

```powershell
New-UDBackdrop -Id 'backdrop' -Content {
    New-UDTypography -Text "Loading..." -Variant h2
} -Open -OnClick {
    Set-UDElement -Id 'backdrop' -Properties @{
        open = $false
    }
}
```

## API&#x20;

* [New-UDBackdrop](https://github.com/ironmansoftware/universal-docs/blob/master/cmdlets/New-UDBackdrop.txt)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.powershelluniversal.com/master-1/userinterfaces/dashboards/components/feedback/backdrop.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
