-
-
Notifications
You must be signed in to change notification settings - Fork 109
[docs] Tabs examples with motion #1613
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
keepMounted | ||
hidden={undefined} | ||
{...otherProps} | ||
render={(renderProps, state) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be handy for the state
here to provide all the --active-tab-*
values to plug into motion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it doesn't matter, it accepts CSS variables anyway
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couldn't get motion to animate based on these value, raw values are actually already in state.selectedTabSize/Position.*
Maybe motion values have to be used: https://motion.dev/docs/react-motion-value
ad5a932
to
0f4d2dd
Compare
#1494
#1486
Demo: https://deploy-preview-1613--base-ui.netlify.app/experiments/tabs/motion
mode="wait"
on AnimatePresence, the entering child waits until the exiting child has animated out, othermode
s should be possible, though extra display/positioning styles would be required (set via motion) to prevent overlap:hidden={undefined}
onTabs.Panel
is required to ensure the panel is visible during the exit animation (same workaround as Collapsible)