# .NET MAUI Accordion Animation

Telerik .NET MAUI Accordion provides an option to set the animation when expanding/collapsing an accordion item.

## Animation while Expanding/Collapsing

To enable or disable the animation, use the `IsAnimationEnabled` (`bool`) property of `RadAccordion`. By default, the Animation is enabled.

You can also customize the duration and easing through `AnimationDuration` and `AnimationEasing` properties.

* `AnimationDuration`(`int`)—Defines the duration of the animation while expanding/collapsing the `AccordionItem`. The default value is `500`.
* `AnimationEasing`(`Microsoft.Maui.Easing`)—Specifies animation acceleration over time. The default value is `Easing.Linear`.

## Example

The snippet below shows how the `AnimationDuration` and `AnimationEasing` properties can be applied:

```XAML
<telerik:RadAccordion CanCollapseAllItems="True"
                      CanExpandMultipleItems="True"
                      AnimationDuration="1500"
                      AnimationEasing="{Static Easing.SpringOut}"
                      Spacing="5">
    <telerik:AccordionItem HeaderText="Attachments" IsExpanded="True">
        <telerik:AccordionItem.Content>
            <Button Text="Attach files" FontSize="20" Margin="10" />
        </telerik:AccordionItem.Content>
    </telerik:AccordionItem>
    <telerik:AccordionItem HeaderText="Comments">
        <telerik:AccordionItem.Content>
            <Label Text="Add your comment here" Margin="30" />
        </telerik:AccordionItem.Content>
    </telerik:AccordionItem>
    <telerik:AccordionItem HeaderText="Rating">
        <telerik:AccordionItem.Content>
            <telerik:RadShapeRating x:Name="rating" Margin="20" />
        </telerik:AccordionItem.Content>
    </telerik:AccordionItem>
</telerik:RadAccordion>
```

The image below shows the result after running the snippet:

![Telerik UI for .NET MAUI Accordion with expanded Attachments, Comments, and Rating items](https://www.telerik.com/maui-ui/documentation/assets/0c930c4a6c9a4520887aafe2a9c01d68/accordion-animation-1.png)

And the `RadAccordion` when all items are collapsed:

![Telerik UI for .NET MAUI Accordion with Attachments, Comments, and Rating items collapsed](https://www.telerik.com/maui-ui/documentation/assets/4508d1b223d9e41c1b4c5d652b07da30/accordion-animation-2.png)

> important For the Accordion Animation example refer to the [SDKBrowser Demo Application](https://www.telerik.com/maui-ui/documentation/demos-and-sample-apps/sdkbrowser-app).

## See Also

* [AccordionItem](https://www.telerik.com/maui-ui/documentation/controls/accordion/accordion-item)
* [Expand and Collapse states](https://www.telerik.com/maui-ui/documentation/controls/accordion/states)
* [Item spacing](https://www.telerik.com/maui-ui/documentation/controls/accordion/item-spacing)
