     [:form attrs elems]))
 
 (defn group-title
+
+  "A title for a logical group of controls.
+
+   Arguments:
+
+  [attrs] title [:tag <tag-name>]
+
+  attrs - (optional) attributes handed over to React (see https://github.com/r0man/sablono#html-attributes)
+  title - the title; a string or Hiccup/Sablono style template
+  tag   - (optional) name of the tag to use, e.g. :h4"
+
   [& 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 html5-input
+
+  "TODO"
+
+  [type & args]
+  (let [[attrs [label placeholder cursor korks & opts]] (resolve-args type {} args)]
+    (apply html5-input* attrs label placeholder cursor korks (name type) opts)))
+
+
+
 (defn text
+
+  "Text input. See http://getbootstrap.com/css/#inputs
+
+   Arguments:
+
+   See `html5-input`
+
+   For compatilibity and available attributes see http://www.w3schools.com/html/html_form_input_types.asp"
+
   [& args]
   (apply html5-input :text args))
 
 (defn password
+
+  "Password input. See http://getbootstrap.com/css/#inputs
+
+   Arguments:
+
+   See `html5-input`
+
+   For compatilibity and available attributes see http://www.w3schools.com/html/html_form_input_types.asp"
+
   [& args]
   (apply html5-input :password args))
 
 
 (defn form-buttons
+
+  "Auto-aligning form buttons.
+
+   Arguments:
+
+   button-1 ... button-n"
+
   [& buttons]
   [:div.form-group.form-buttons
    (apply unlabeled-control false buttons)])
 
 (defn button
+
+  "Button. See http://getbootstrap.com/css/#buttons
+
+  Arguments:
+
+  [attrs] label on-click [:in-progress <bool> :disabled <bool]
+
+  attrs        - (optional) attributes handed over to React (see https://github.com/r0man/sablono#html-attributes)
+  label        - button label; a string or Hiccup/Sablono style template
+  on-click     - lambda to handle clicks
+  :in-progress - true to show an indicator that a background action is in progress and disable the button
+  :disabled    - true to disable the button"
+
   [& args]
   (let [[attrs [label on-click & {:keys [in-progress disabled]}]] (resolve-args :button
                                                                                 {:type  "button"

          (error-label validation-error))))))

(defn radio                                                 ;; TODO: Extract common method for `radio` and `checkbox`.
  [& args]
  (let [[attrs [label cursor korks value & {:keys [valid? validation-error-fn inline]}]] (resolve-args :radio {} args)
        dom-id (gen-dom-id cursor korks)

             (spinner)))]))

(defn button-primary

  "Primary button. See http://getbootstrap.com/css/#buttons

  Arguments:

  See `button`."

  [& args]
  (let [[attrs [& rest-args]] (resolve-args :button-primary {:class "btn-primary"} args)]
    (apply button attrs rest-args)))

(defn button-default

  "Default button. See http://getbootstrap.com/css/#buttons

  Arguments:

  See `button`."


  [& args]
  (let [[attrs [& rest-args]] (resolve-args :button-default {:class "btn-default"} args)]
    (apply button attrs rest-args)))

(defn button-group

  "Button group.

  Arguments:

  [attrs] button-1 ... button-n

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

  [& args]
  (let [[attrs [& buttons]] (resolve-args :button-group {:class "button-group"} args)]
    [:div attrs (seq buttons)]))

(defn checkbox

  "Checkbox. See http://getbootstrap.com/css/#checkboxes-and-radios

  Arguments:

  [attrs] label cursor korks value [:valid? <bool> :validation-error-fn <lambda> :inline <bool>]

  attrs                 - (optional) attributes handed over to React (see https://github.com/r0man/sablono#html-attributes)
  label                 - the label; a string or Hiccup/Sablono style template
  cursor, korks         - data to bind to
  :inline               - (optional) if true renders the control inline
  :valid?               - (optional) if false shows a validation error; internal
  :validation-error-fn  - (optional) lambda <korks> -> <error message>; internal"

  [& args]
  (let [[attrs [label cursor korks & {:keys [valid? validation-error-fn inline]}]] (resolve-args :checkbox {} args)
        dom-id (gen-dom-id cursor korks)
