Fancy Resizing

Anyone know a good way to do a resize of a side bar where: 

  • The bar has a minimum size where resizing stops. 
  • If the user pulls the mouse substantially further the window minimizes/hides.

Try the left panel in Xcode for the behaviour I'm after. 

It'd be nice to be able to do this both in a StretchableLayout and with a ResizableEdgeComponent.  

I'm suspecting there's no out-of-the-box solution and I'll need to override the mouse dragging behaviour, which seems straightfoward enough for a resizable edge at least...