LightTable Api Documentation

Version: 0.8.1

lt.macros

Macros used across LT

background

macro

(background func)
Register given func to run on background thread

behavior

macro

(behavior name & {:keys [reaction], :as r})
Define a behavior with a unique namespaced keyword and multiple key value pairs.
Keys are:

* :reaction (required) - Function to invoke when behavior is called.
                         First arg is object behavior is attached to
* :triggers (required) - Set of keyword triggers that trigger behavior
* :desc - Brief description of behavior
* :type - When set to :user, shows up in hints. Not enabled by default
* :params - Vector of maps describing behavior args. Each map contains required :label key
            and optional keys of :type (:string, :number or :list), :items and :example
* :throttle - Number of ms to throttle reaction fn
* :debounce - Number of ms to debounce reaction fn

defui

macro

(defui sym params hiccup & events)
Define a UI element for given hiccup data and key-value pairs
of events for element