Help component for displaying key bindings.
Usage: (def bindings [{:key "j/k" :desc "up/down"} {:key "q" :desc "quit"}]) (def my-help (help bindings))
;; In view function: (help-view my-help)
Help component for displaying key bindings.
Usage:
(def bindings [{:key "j/k" :desc "up/down"}
{:key "q" :desc "quit"}])
(def my-help (help bindings))
;; In view function:
(help-view my-help)Scrollable list component with item selection.
Usage: (def my-list (item-list ["Apple" "Banana" "Cherry"]))
;; In update function: (list-update my-list msg)
;; In view function: (list-view my-list)
Scrollable list component with item selection. Usage: (def my-list (item-list ["Apple" "Banana" "Cherry"])) ;; In update function: (list-update my-list msg) ;; In view function: (list-view my-list)
Pagination component for displaying page indicators.
Usage: (def pager (paginator :total-pages 5))
;; In update function: (paginator-update pager msg)
;; In view function: (paginator-view pager)
Pagination component for displaying page indicators. Usage: (def pager (paginator :total-pages 5)) ;; In update function: (paginator-update pager msg) ;; In view function: (paginator-view pager)
Progress bar component.
Usage: (def my-progress (progress-bar :width 40))
;; Update progress (0.0 to 1.0): (set-progress my-progress 0.5)
;; In view function: (progress-view my-progress)
Progress bar component. Usage: (def my-progress (progress-bar :width 40)) ;; Update progress (0.0 to 1.0): (set-progress my-progress 0.5) ;; In view function: (progress-view my-progress)
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)
Table component with aligned columns, optional borders, and row cursor.
Usage: (def tbl (table [{:title "Name" :width 20} {:title "Value" :width 30}] [["foo" "bar"] ["baz" "qux"]] :cursor 0))
;; In update function: (table-update tbl msg)
;; In view function: (table-view tbl)
Table component with aligned columns, optional borders, and row cursor.
Usage:
(def tbl (table [{:title "Name" :width 20} {:title "Value" :width 30}]
[["foo" "bar"] ["baz" "qux"]]
:cursor 0))
;; In update function:
(table-update tbl msg)
;; In view function:
(table-view tbl)Text input component with cursor movement and editing.
Usage: (def my-input (text-input :prompt "Name: "))
;; In update function: (text-input-update my-input msg)
;; In view function: (text-input-view my-input)
Text input component with cursor movement and editing. Usage: (def my-input (text-input :prompt "Name: ")) ;; In update function: (text-input-update my-input msg) ;; In view function: (text-input-view my-input)
Countdown timer component.
Usage: (def my-timer (timer :timeout 60000)) ; 60 seconds
;; In update function: (timer-update my-timer msg)
;; In view function: (timer-view my-timer)
Countdown timer component. Usage: (def my-timer (timer :timeout 60000)) ; 60 seconds ;; In update function: (timer-update my-timer msg) ;; In view function: (timer-view my-timer)
Scrollable text area component.
Displays a window into pre-rendered (possibly styled) text content.
Usage: (def vp (viewport "Long text content..." :height 10))
;; In update function: (viewport-update vp msg)
;; In view function: (viewport-view vp)
Scrollable text area component. Displays a window into pre-rendered (possibly styled) text content. Usage: (def vp (viewport "Long text content..." :height 10)) ;; In update function: (viewport-update vp msg) ;; In view function: (viewport-view vp)
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 |