Liking cljdoc? Tell your friends :D

charm.components.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)

Animated spinner component.

Usage:
  (def my-spinner (spinner :dots))

  ;; In update function:
  (spinner-update my-spinner msg)

  ;; In view function:
  (spinner-view my-spinner)
raw docstring

spinnerclj

(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)
sourceraw docstring

spinner-initclj

(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.
sourceraw docstring

spinner-typesclj

Predefined spinner animations with frames and interval.

Predefined spinner animations with frames and interval.
sourceraw docstring

spinner-updateclj

(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.
sourceraw docstring

spinner-viewclj

(spinner-view spinner)

Render the spinner to a string.

Render the spinner to a string.
sourceraw docstring

spinning?clj

(spinning? spinner msg)

Check if a message is for this spinner.

Check if a message is for this spinner.
sourceraw docstring

tick-msgclj

(tick-msg spinner-id tag)

Create a spinner tick message.

Create a spinner tick message.
sourceraw docstring

tick-msg?clj

(tick-msg? msg)

Check if a message is a spinner tick.

Check if a message is a spinner tick.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close