(clamp-index idx cnt)Clamp idx within [0, count-1]. Returns 0 when count <= 0.
Clamp idx within [0, count-1]. Returns 0 when count <= 0.
(next-key? direction key)Returns true if key is a 'next' key for the given direction.
Returns true if key is a 'next' key for the given direction.
(normalize {:keys [autoplay-present? interval-raw loop-present? arrows-raw
dots-raw disabled-present? current-raw transition-raw
direction-raw peek-raw aria-label-raw slide-count]})Normalise raw attribute inputs into a stable view-model map.
Normalise raw attribute inputs into a stable view-model map.
(parse-bool-default-true s)Parse an attribute that is true when absent or empty, false only when "false".
Parse an attribute that is true when absent or empty, false only when "false".
(parse-direction s)Normalise direction attribute to "horizontal" or "vertical".
Normalise direction attribute to "horizontal" or "vertical".
(parse-non-neg-int s fallback)Parse a string to a non-negative integer. Returns fallback on failure.
Parse a string to a non-negative integer. Returns fallback on failure.
(parse-peek s)Validate a CSS length string for peek. Returns default on invalid.
Validate a CSS length string for peek. Returns default on invalid.
(parse-pos-int s fallback min-val)Parse a string to a positive integer >= min-val. Returns fallback on failure.
Parse a string to a positive integer >= min-val. Returns fallback on failure.
(parse-transition s)Normalise transition attribute to "slide" or "fade".
Normalise transition attribute to "slide" or "fade".
(prev-key? direction key)Returns true if key is a 'previous' key for the given direction.
Returns true if key is a 'previous' key for the given direction.
(snap-direction delta velocity)Given drag delta (positive = toward prev) and velocity (px/ms, positive = toward prev), returns :prev, :next, or :stay.
Given drag delta (positive = toward prev) and velocity (px/ms, positive = toward prev), returns :prev, :next, or :stay.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |