# Blazor Popover Overview

The <a href = "https://www.telerik.com/blazor-ui/popover" target="_blank">Blazor Popover component</a> behaves much like a tooltip, as it helps you display additional information in a container that shows on top of the other page content. The major differences between the Popover and the [Tooltip](https://www.telerik.com/blazor-ui/documentation/components/tooltip/overview) components is that the Popover has built-in support for action buttons and provides more configuration options about its animation and placement on the screen. This article explains how to start using the component and describes its features.

## Creating Blazor Popover

1. Add the `<TelerikPopover>` tag to a Razor file.
2. Set the `AnchorSelector` parameter to a CSS selector, which points to the HTML element that the Popover will align with.
3. Configure how the app will show and hide the Popover component. Use one or both options below:
   * Set the `ShowOn` parameter to an `PopoverShowOn` enum value to set which user interaction with the anchor will display the Popover automatically.
   * [Obtain the component reference with the `@ref` attribute](https://www.telerik.com/blazor-ui/documentation/components/popover/overview#popover-reference-and-methods) to show and hide the Popover programmatically.
4. Add the content to the `<PopoverContent>` child tag.
5. (optional) Configure the Popover `Position` and `Offset`, or add a title inside the `<PopoverHeader>` tag.

> caption Basic Telerik Popover for Blazor

<demo metaUrl="client/popover/overview/basic/"></demo>

## Popover Positioning and Collision

Use the available positioning and collision settings to customize how the Popover positions itself and reacts to insufficient space in the viewport. [Read more about the Blazor Popover Positioning and Collision...](https://www.telerik.com/blazor-ui/documentation/components/popover/position-collision)

## Popover Animations

Use the available parameters to customize the animation type and its duration. [Read more about the Blazor Popover Animations...](https://www.telerik.com/blazor-ui/documentation/components/popover/animation)

## Popover Parameters

The Blazor Popover provides parameters to configure the component. Also check the [Popover API Reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikpopover) for a full list of properties.

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

| Parameter           | Type                                                 | Description                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| ------------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `ActionsLayout`     | `PopoverActionsLayoutAlign ` enum <br /> (`Stretch`) | The positioning of the elements in the `<PopoverActions>` child tag. The possible values are `Stretch`, `Start`, `Center`, and `End`.                                                                                                                                                                                                                                                                                                            |
| `AnchorSelector`    | `string`                                             | The CSS selector targeting the element that the Popover uses as an anchor.                                                                                                                                                                                                                                                                                                                                                                       |
| `AnimationDuration` | `int`                                                | The duration of the animation in milliseconds. [Read more about Popover animations...](https://www.telerik.com/blazor-ui/documentation/components/popover/animation)                                                                                                                                                                                                                                                                             |
| `AnimationType`     | `AnimationType` enum <br /> (`SlideDown`)            | The type of animation when the component displays and hides. [Read more about Popover animations...](https://www.telerik.com/blazor-ui/documentation/components/popover/animation)                                                                                                                                                                                                                                                               |
| `Collision`         | `PopoverCollision` enum <br /> (`Fit`)               | The behavior of the Popover when it doesn't fit in the viewport. [Read more about Popover collision...](https://www.telerik.com/blazor-ui/documentation/components/popover/position-collision)                                                                                                                                                                                                                                                   |
| `Offset`            | `double `                                            | The [space between the Popover and its anchor](https://www.telerik.com/blazor-ui/documentation/components/popover/position-collision#offset) in pixels. The component ignores its callout when applying this setting.                                                                                                                                                                                                                            |
| `Position`          | `PopoverPosition  ` enum <br /> (`Top`)              | The position relative to the target element at which the Popover will be shown. [Read more about Popover position...](https://www.telerik.com/blazor-ui/documentation/components/popover/position-collision)                                                                                                                                                                                                                                     |
| `ShowCallout`       | `bool` <br /> (`true`)                               | Defines if the callout is rendered.                                                                                                                                                                                                                                                                                                                                                                                                              |
| `ShowOn`            | `PopOverShowOn?` enum <br /> (`null`)                | The browser event that will display the Popover (`MouseEnter` or `Click`) without the need to [use component methods](https://www.telerik.com/blazor-ui/documentation/components/popover/overview#popover-reference-and-methods). When you set the `ShowOn` parameter to `Click`, the Popover will hide when the user clicks outside the component. If the parameter value is `MouseEnter`, the Popover will hide when the mouse pointer leaves. |

### Styling and Appearance

The following parameters enable you to customize the appearance of the Blazor Popover:

| Parameter | Type     | Description                                                                                                                                                                                                                       |
| --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Class`   | `string` | The custom CSS class to be rendered on the `<div>` element, which wraps the component `ChildContent`. Use for [styling customizations](https://www.telerik.com/blazor-ui/documentation/styling-and-themes/override-theme-styles). |
| `Height`  | `string` | The height of the Popover.                                                                                                                                                                                                        |
| `Width`   | `string` | The width of the Popover.                                                                                                                                                                                                         |

## Popover Reference and Methods

To execute Popover methods, obtain a reference to the component instance with `@ref`.

| Method    | Description                                                                                                                                                                                                                                                                                                                                          |
| --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `Refresh` | Use this method to programmatically re-render the Popover. <br /> The Popover is rendered as a child of the `TelerikRootComponent`, instead of where it is declared. As a result, it doesn't automatically refresh when its content is updated. In such cases, the `Refresh` method comes in handy to ensure that the Popover content is up-to-date. |
| `Show`    | Use this method to display the Popover.                                                                                                                                                                                                                                                                                                              |
| `Hide`    | Use this method to close the Popover.                                                                                                                                                                                                                                                                                                                |

<demo metaUrl="client/popover/overview/methods/" height="300"></demo>

## Next Steps

* [Explore the Popover Positioning and Collision Settings](https://www.telerik.com/blazor-ui/documentation/components/popover/position-collision)
* [Customize the Popover Animations](https://www.telerik.com/blazor-ui/documentation/components/popover/animation)

## See Also

* [Live Popover Demos](https://demos.telerik.com/blazor-ui/popover/overview)
* [Popover API Reference](https://www.telerik.com/blazor-ui/documentation/api/telerik.blazor.components.telerikpopover)
* [Comparison between All Popup Components](https://www.telerik.com/blazor-ui/documentation/knowledge-base/common-popup-component-comparison)
