Built a quick little resizable elastic min/max width sidebar using Motion primitives.
@PixelJanitor11K followers
35,086 views
33 Comments
Comments from the original post on X (Twitter)

@merycodes
@motiondotdev You and the attention to details 🔥
4 likes

@PixelJanitor
You don' kno' me!
1 like

@_joerl
@motiondotdev super nice, love that the toggle animation is simpler. been playing with elastics this week too
2 likes

@nandafyi
@motiondotdev clean af
2 likes

@PixelJanitor
@motiondotdev

@chmielwork
@motiondotdev Add a double click to get back to the default width
1 like

@PixelJanitor
@motiondotdev May have to try that, but these types of things feel like the "half open macbook" theory where users are forced to set it to where they want it to be, not where it was put for them.
1 like

@chmielwork
@motiondotdev yeah, that’s a fair point. but if i resize the sidebar to a specific width, then later make it narrower or wider, it would be nice if the app remembered my previous width. that way, a double-click could restore it to the exact width i had set before

@PixelJanitor
@motiondotdev Follow up: Added a double click that just always returns it to the default width 👍🏻
2 likes

@chmielwork
@motiondotdev You the champ!

@DeckardBuilds
@motiondotdev Elastic UI is always a win for me
1 like

@ankur5ahu
@motiondotdev rubber banding ftw
1 like

@PixelJanitor
@motiondotdev 🙌
1 like

@alvishbaldha
@motiondotdev 😮💨
1 like

@jacobjolibois
@motiondotdev Super nice 👌🏼 I need to bring that rubber banding into our sidebar component.
1 like

@PixelJanitor
@motiondotdev Thanks!

@willking
@motiondotdev Love built in friction
1 like

@frantzfries
@motiondotdev great interactions
1 like

@JulianLenz_
@motiondotdev can you share how its done?

@marcopfortes
@motiondotdev Now add something like this












