-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add option to animate expanding/collapsing #25
Comments
I feel like this should be possible using CSS alongside the |
I was thinking something like |
@huntabyte If you have the time to create a barebones REPL example with how you were thinking it could work with CSS that would be great! |
Using a css transition-duration on the Pane while collapsing works well, until u have more than 2 Panes.
|
One solution might be to take the |
A simple solution that worked for me was to use transition on flex. e.g. <Resizable.PaneGroup direction="horizontal" class="w-full h-full">
<Resizable.Pane
defaultSize={30}
maxSize={40}
minSize={20}
order={1}
collapsible={true}
class="transition-[flex] duration-300"
>
<SideBar />
</Resizable.Pane>
<Resizable.Handle />
<Resizable.Pane defaultSize={70} order={2}>
<slot />
</Resizable.Pane>
</Resizable.PaneGroup> This actually allowed me to have a nicer animation on collapse. |
@Tsuzat This only works well for two Panes. + you'll get an easing side effect on drag, if you don't add the class dynamically |
Describe the feature in detail (code, mocks, or screenshots encouraged)
It would be nice if you could define a tween or easing function to animate the opening and closing of a pane.
What type of pull request would this be?
New Feature
Provide relevant links or additional information.
No response
The text was updated successfully, but these errors were encountered: