# Popup Appearance

The Kendo UI for Angular Menu provides flexible options to customize the appearance and behavior of the popup element that appears when opening the Menu.

<Row>
  <Column count={[24,24,8]} style={{marginBottom: "1rem"}}>
    <Component className="tile" href="#popup-settings">
      <ComponentTitle>Popup Settings</ComponentTitle>
      <ComponentDescription style={{padding: "0 10px 10px 10px"}}>Apply custom CSS classes and set margins on the popup using the <code>popupSettings</code> property.</ComponentDescription>
    </Component>
  </Column>
  <Column count={[24,24,8]} style={{marginBottom: "1rem"}}>
    <Component className="tile" href="#animation">
      <ComponentTitle>Animation</ComponentTitle>
      <ComponentDescription style={{padding: "0 10px 10px 10px"}}>Configure the type and duration of the animation when the popup opens and closes.</ComponentDescription>
    </Component>
  </Column>
  <Column count={[24,24,8]} style={{marginBottom: "1rem"}}>
    <Component className="tile" href="#popup-container">
      <ComponentTitle>Popup Container</ComponentTitle>
      <ComponentDescription style={{padding: "0 10px 10px 10px"}}>Control where the popup renders in the DOM using the <code>appendTo</code> property.</ComponentDescription>
    </Component>
  </Column>
</Row>

The following example demonstrates how to customize the Menu popup appearance by configuring the animation settings and applying custom CSS classes.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/menus/popup-appearance/source.txt)

## Popup Settings

Use the [`popupSettings`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/menucomponent#popupsettings) property to customize the styling and spacing of the popup. The property accepts a [`PopupSettings`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/popupsettings) object with the following options:

* [`popupClass`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/popupsettings#popupclass)—Specifies the CSS classes to apply to the popup container. Use this option to apply custom styles like borders, shadows, or background colors.
* [`margin`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/popupsettings#margin)—Sets the horizontal and vertical margin value in pixels, adding space between the popup and the anchor element.

```HTML
<kendo-menu [items]="items" [popupSettings]="popupSettings">
</kendo-menu>
```

```TS
public popupSettings: PopupSettings = {
    popupClass: 'custom-popup',
    margin: { horizontal: 0, vertical: 4 }
};
```

```CSS
.custom-popup {
    border-left: 3px solid #ff6358;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
```

## Animation

Use the [`animate`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/menucomponent#animate) property to configure how the animation of the Menu popup when opening and closing. Set `animate` to `false` to disable animations, or provide a [`MenuAnimation`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/menuanimation) object to customize the animation behavior.

The `MenuAnimation` interface provides the following options:

* [`type`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/menuanimation#type)—The animation type. The default value is `slide`.
* [`duration`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/menuanimation#duration)—The animation duration in milliseconds. The default value is `100`.

```ts
public animationSettings: MenuAnimation = {
    type: 'expand',
    duration: 200
};
```

## Popup Container

By default, the Menu popup renders at the root level of the application. Use the [`appendTo`](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/menucomponent#appendto) property of the Menu component to specify a different container for the popup. This option is useful when you need the popup to render in a specific location in the DOM.

```HTML
<kendo-menu [items]="items" [appendTo]="popupContainer"></kendo-menu>
<div #popupContainer></div>
```

```TS
@ViewChild('popupContainer', { read: ViewContainerRef })
public popupContainer: ViewContainerRef;
```

## Suggested Links

* [Menu Appearance](https://www.telerik.com/kendo-angular-ui-develop/components/menus/menu/appearance)
* [ContextMenu Popup Appearance](https://www.telerik.com/kendo-angular-ui-develop/components/menus/contextmenu/popup-appearance)
* [API Reference of PopupSettings](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/popupsettings)
* [API Reference of MenuAnimation](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/menuanimation)
* [API Reference of the Menu](https://www.telerik.com/kendo-angular-ui-develop/components/menus/api/menucomponent)
