(confirm question)
(confirm question default-value)
Prompt a question
and wait for user to reply yes or no.
Accepted inputs are:<br/>
default-value
is a boolean and can set the default selected option, true for Yes and false for No.
Prompt a `question` and wait for user to reply yes or no. Accepted inputs are:<br/> - y | Y | yes | YES<br/> - n | N | no | NO `default-value` is a boolean and can set the default selected option, true for Yes and false for No.
(input question)
(input question validate-fn)
Prompt a question
and wait for user to insert a free input string.<br/>
Input can be validated if validate-fn
is passed as function that returns:<br/>
Prompt a `question` and wait for user to insert a free input string.<br/> Input can be validated if `validate-fn` is passed as function that returns:<br/> - nil if input is valid.<br/> - String error if input is not valid. Returned String is displayed with an error style.
(list-checkbox question choices)
Prompt a question
with a list of choices
and wait for user to check and select some of them.
Choices can be:
; List of strings. Same label and value, none is checked by default.
[ "One" "Two" "Three" ]
; List of maps.
[
{:label "One" :value "1" :checked true}
{:label "Two" :value "2" :checked false}
{:label "Three" :value "3" :checked false}
]
Prompt a `question` with a list of `choices` and wait for user to check and select some of them. Choices can be: ```clojure ; List of strings. Same label and value, none is checked by default. [ "One" "Two" "Three" ] ; List of maps. [ {:label "One" :value "1" :checked true} {:label "Two" :value "2" :checked false} {:label "Three" :value "3" :checked false} ] ```
(list-select question choices)
Prompt a question
with a list of choices
and wait for user to select one of them
Choices can be:
; List of strings. Same label and value.
[ "One" "Two" "Three" ]
; List of maps.
[
{:label "One" :value "1"}
{:label "Two" :value "2"}
{:label "Three" :value "3"}
]
Prompt a `question` with a list of `choices` and wait for user to select one of them Choices can be: ```clojure ; List of strings. Same label and value. [ "One" "Two" "Three" ] ; List of maps. [ {:label "One" :value "1"} {:label "Two" :value "2"} {:label "Three" :value "3"} ] ```
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close