We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Drawer uses one-off motion components currently.
Investigate the challenges of refactoring the Drawer motions to reusable Slide and Fade motion components.
Slide
Fade
animateOpacity
Elevate
dir
useFluent()
--fui-Drawer--size
The text was updated successfully, but these errors were encountered:
Opacity transitions occur in all 3 of the custom motion components for Drawer.
OverlaySurfaceBackdropMotion is very close to the Fade component; the difference is that the duration is dynamic, based on a size parameter:
OverlaySurfaceBackdropMotion
size
export const OverlaySurfaceBackdropMotion = createPresenceComponent(({ size }: OverlayDrawerSurfaceMotionParams) => { const keyframes = [{ opacity: 0 }, { opacity: 1 }]; const duration = durations[size]; return { enter: { keyframes, easing: motionTokens.curveLinear, duration, }, exit: { keyframes: [...keyframes].reverse(), easing: motionTokens.curveLinear, duration, }, }; });
The size-to-duration mappings are:
small: motionTokens.durationGentle, medium: motionTokens.durationSlow, large: motionTokens.durationSlower, full: motionTokens.durationUltraSlow,
Some of these durations are not represented in our Fade variants.
Sorry, something went wrong.
robertpenner
No branches or pull requests
Drawer uses one-off motion components currently.
Investigate the challenges of refactoring the Drawer motions to reusable
Slide
andFade
motion components.Custom Motion Components
InlineDrawerMotion
Slide
withanimateOpacity
for this.OverlayDrawerMotion
Elevate
motion component for the shadow.OverlaySurfaceBackdropMotion
Fade
, except for the dynamic durations (see comment below).Other Considerations
dir
fromuseFluent()
.--fui-Drawer--size
.The text was updated successfully, but these errors were encountered: