# Popup Position and Collision

This article outlines how to control the position of the Popup based on its anchor and dictate how the component responds to insufficient screen space.

## Position

You can customize how the popup and its anchor align with each other. You can use the available parameters to control the position of the component.

### Anchor Alignment

Use the available parameters to control which part of the anchor touches the Popup.

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Parameter               | Type                         | Enum Members                                          |
| ----------------------- | ---------------------------- | ----------------------------------------------------- |
| `AnchorHorizontalAlign` | `PopupAnchorHorizontalAlign` | `Center` <br /> `Left` (default value) <br /> `Right` |
| `AnchorVerticalAlign`   | `PopupAnchorVerticalAlign`   | `Bottom` (default value) <br /> `Center` <br /> `Top` |

See the [example](https://www.telerik.com/blazor-ui/documentation/components/popup/position-collision#example) below to customize the available parameters and see how they affect the Popup component.

### Popup Alignment

Use the available parameters to control which side of the Popup is in contact with the anchor.

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Parameter         | Type                   | Enum Members                                          |
| ----------------- | ---------------------- | ----------------------------------------------------- |
| `HorizontalAlign` | `PopupHorizontalAlign` | `Center` <br /> `Left` (default value) <br /> `Right` |
| `VerticalAlign`   | `PopupVerticalAlign`   | `Bottom` <br /> `Center` <br /> `Top` (default value) |

## Collision

There are two collision modes available for the Popup component:

* `Fit`—The Popup will shift until it is fully visible on the screen.
* `Flip`—The Popup will render on the other side of the anchor.

Use the available parameters to control how the Popup reacts to insufficient screen space.

<style>
    .article table {
        table-layout: auto;
        word-break: normal;
    }
</style>

| Parameter             | Type              | Enum Members                        |
| --------------------- | ----------------- | ----------------------------------- |
| `HorizontalCollision` | `PopupCollision ` | `Fit` (default value) <br /> `Flip` |
| `VerticalCollision`   | `PopupCollision ` | `Fit` <br /> `Flip` (default value) |

See the [example](https://www.telerik.com/blazor-ui/documentation/components/popup/position-collision#example) below to customize the available parameters and see how they affect the Popup component.

## Example

The following example lets you experiment with the available settings that control the position and collision behavior of the Popup. It starts with the default component behavior.

<demo metaUrl="client/popup/position-collision/" height="560"></demo>

## See Also

* [Live Popup Demos](https://demos.telerik.com/blazor-ui/popup/overview)
* [Popup API Reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikpopup)
