                                   :value    (get-in cursor korks)})]
     (input* :input input-attrs label cursor korks opts)))
 
-(defn html5-input
-  [type & args]
-  (let [[attrs [label placeholder cursor korks & opts]] (resolve-args type {} args)]
-    (apply html5-input* attrs label placeholder cursor korks (name type) opts)))
-
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;; Public
 
 (defn panel
+
+  "A panel. See http://getbootstrap.com/components/#panels
+
+  Arguments:
+
+  [attrs] title [:close <lambda>] element1 ... element2
+
+    attrs - (optional) attributes handed over to React (see https://github.com/r0man/sablono#html-attributes)
+    title - panel title; a string or Hiccup/Sablono style template
+    :close - (optional) lambda to call when panel is closed; when the option is set, the panel shows a close icon (FontAwesome by default)
+    contents - (optional) the contained elements
+
+  Examples:
+
+  (panel \"A simple panel\" [:div \"Contents go here\"])
+  (panel {:class \"my-special-panel\"} \"My special panel\" :close #(js/alert \"closed\") [:div \"Contents go here\"])"
+
   [& args]
   (let [[attrs [title & rest-args]] (resolve-args :panel {:class "panel panel-default"} args)
         [{:keys [close]} [& contents]] (parse-options rest-args)]

    [:form attrs elems]))

(defn group-title
  [& args]
  (let [[attrs [title & {:keys [tag]}]] (resolve-args :group-title {:class "group-title"} args)]
    [(or tag (get-in *options* [:group-title :tag]))
     attrs
     title]))

(defn text
  [& args]
  (apply html5-input :text args))

(defn password
  [& args]
  (apply html5-input :password args))


(defn form-buttons
  [& buttons]
  [:div.form-group.form-buttons
   (apply unlabeled-control false buttons)])

(defn button
  [& args]
  (let [[attrs [label on-click & {:keys [in-progress disabled]}]] (resolve-args :button
                                                                                {:type  "button"

      (seq contents)]]))

(defn form

  "A form. See http://getbootstrap.com/css/#forms

  Arguments:

  [attrs] element1 ... element2

  attrs - (optional) attributes handed over to React (see https://github.com/r0man/sablono#html-attributes)
  contents - (optional) the contained elements

  Examples:

  (form [:div \"Contents go here\"])
  (form {:style {:background-color \"red\"}} [:div \"Contents go here\"])"

  [& args]
  (let [[attrs & elems] (resolve-args :form
                                      {:on-submit #(.preventDefault %)
