Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Motion components allow ref forwarding via function #33677

Open
1 task done
YuanboXue-Amber opened this issue Jan 16, 2025 · 0 comments
Open
1 task done

[Feature]: Motion components allow ref forwarding via function #33677

YuanboXue-Amber opened this issue Jan 16, 2025 · 0 comments

Comments

@YuanboXue-Amber
Copy link
Contributor

Area

React Components (@fluentui/react-components)

Describe the feature that you would like added

Allow below API from Motion components

const FadeEnter = createMotionComponent(options);
<FadeEnter>
  {(nodeRef) => <Input root={{ref: nodeRef}}} />
</FadeEnter>

Reason:
There are components in fluent v9 libraries that has primary slot, for example Input. When wrapping Motion components around Input, the primary slot input is animated, not the container root.
https://stackblitz.com/edit/z3cxg9yd?file=src%2Fexample.tsx - Animation is applied only on the input slot

Additional context

No response

Have you discussed this feature with our team

@ling1726 @layershifter

Validations

  • Check that there isn't already an issue that requests the same feature to avoid creating a duplicate.

Priority

Medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants