[menu] Motion with Menu
- Dominant language
- TypeScript
- Stars
- 10.9k
- Forks
- 543
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 101
Description
# Bug report
## Current behavior
Bug when using Motion with Menu: when using the render component in Menu.Popup, the initial side value is always “bottom” and only switches to “top” after requestAnimationFrame. As a result, if you set the initial animation with side === “top”, it won’t run; in practice it only recognizes side === “bottom”.
```typescript
{
console.log("state", state); // allway bottom
return (
{
if (!open) {
actionsRef?.current.unmount();
}
}}
transition={{
duration: 0.2,
ease: "easeOut",
}}
/>
);
}}
>
{children}
```
## Base UI version
1.0.0
## Which browser are you using?
Chrome
## Which OS are you using?
Mac OS.
Contributor guide
Assessment
This issue has not been assessed yet.