 
 public class TopBottomAnimation: NSObject, Animator {
 
-    enum Style {
+    public enum Style {
         case top
         case bottom
     }
+    
+    public struct Config {
+        let closeSpeedThreshold: CGFloat
+        let closePercentThreshold: CGFloat
+        
+        static var `default` = Config(closeSpeedThreshold: 750.0, closePercentThreshold: 33.0)
+        
+        public init(closeSpeedThreshold: CGFloat, closePercentThreshold: CGFloat) {
+            self.closePercentThreshold = closePercentThreshold
+            self.closeSpeedThreshold = closeSpeedThreshold
+        }
+    }
 
     public weak var delegate: AnimationDelegate?
-
+    let config: Config
     var style: Style
 
     var translationConstraint: NSLayoutConstraint! = nil

            closePercent = translation.y / height
            panTranslationY = translation.y
        case .ended, .cancelled:
            if closeSpeed > 750.0 || closePercent > 0.33 {
                delegate?.hide(animator: self)
            } else {
                closing = false


    weak var containerView: UIView?

    init(style: Style, delegate: AnimationDelegate, config: Config = Config.default) {
        self.config = config
        self.style = style
        self.delegate = delegate
    }
