Animated spinner component.
Usage: (def my-spinner (spinner :dots))
;; In update function: (spinner-update my-spinner msg)
;; In view function: (spinner-view my-spinner)
Animated spinner component. Usage: (def my-spinner (spinner :dots)) ;; In update function: (spinner-update my-spinner msg) ;; In view function: (spinner-view my-spinner)
(spinner type & {:keys [style id] :or {id (rand-int 1000000)}})Create a spinner component.
Type can be a keyword like :dots, :line, :moon, etc. or a map with :frames and :interval keys.
Options: :style - Style to apply to spinner (optional) :id - Unique ID for this spinner (optional)
Create a spinner component. Type can be a keyword like :dots, :line, :moon, etc. or a map with :frames and :interval keys. Options: :style - Style to apply to spinner (optional) :id - Unique ID for this spinner (optional)
(spinner-init spinner)Initialize the spinner, returns [spinner cmd]. Call this to start the animation.
Initialize the spinner, returns [spinner cmd]. Call this to start the animation.
Predefined spinner animations with frames and interval.
Predefined spinner animations with frames and interval.
(spinner-update spinner msg)Update spinner state based on a message. Returns [new-spinner cmd] or [spinner nil] if message not handled.
Update spinner state based on a message. Returns [new-spinner cmd] or [spinner nil] if message not handled.
(spinner-view spinner)Render the spinner to a string.
Render the spinner to a string.
(spinning? spinner msg)Check if a message is for this spinner.
Check if a message is for this spinner.
(tick-msg spinner-id tag)Create a spinner tick message.
Create a spinner tick message.
(tick-msg? msg)Check if a message is a spinner tick.
Check if a message is a spinner tick.
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 |