This namespace contains replacements for the basic form elements (input, select, textbox) but with corresponding states.
The select
item also supports any kind of values for the
:value
attribute of option
s, not just strings.
Additionally, the new attributes :invalid
and :validate
are
supported for all of them, allowing for a declarative way to
use setCustomValidity
on the dom nodes.
An attribute :report-validity
can be set to true on input items
and form
to call reportValidity
on them on every state
change.
This namespace contains replacements for the basic form elements (input, select, textbox) but with corresponding states. The [[select]] item also supports any kind of values for the `:value` attribute of [[option]]s, not just strings. Additionally, the new attributes `:invalid` and `:validate` are supported for all of them, allowing for a declarative way to use `setCustomValidity` on the dom nodes. An attribute `:report-validity` can be set to true on input items and [[form]] to call `reportValidity` on them on every state change.
(form & content)
(form attrs & content)
The same as reacl-c.dom/form
, but with the additional attribute :report-validity
.
The same as `reacl-c.dom/form`, but with the additional attribute `:report-validity`.
(input)
(input attrs)
An item representing its state as the value of an input element.
The :type
attribute can influence the type of the state:
"checkbox"
and "radio"
the state must be a boolean"file"
it must be a nil
or a js/File
object"submit"
and "cancel"
it is ignorednil
and all other strings, the state must be a string.Note that the :type
can also be one of the types defined in reacl-c-basics.forms.types
.
Also supports the new attributes :invalid
and :validate
.
An item representing its state as the value of an input element. The `:type` attribute can influence the type of the state: - for `"checkbox"` and `"radio"` the state must be a boolean - for `"file"` it must be a `nil` or a `js/File` object - for `"submit"` and `"cancel"` it is ignored - for `nil` and all other strings, the state must be a string. Note that the `:type` can also be one of the types defined in [[reacl-c-basics.forms.types]]. Also supports the new attributes `:invalid` and `:validate`.
(option & contents)
(option attrs & contents)
An item that can be used inside a select
element to define a
selectable option. The attribute :value
can be any value, and the
contents should be the text shown to the user.
An item that can be used inside a [[select]] element to define a selectable option. The attribute `:value` can be any value, and the contents should be the text shown to the user.
(select & options)
(select attrs & options)
A select element that allows option
s to have
arbitrary values. If the :multiple
attribute is set, then the
state of this item must be a list of values or nil.
Also supports the new attributes :invalid
and :validate
.
A select element that allows [[option]]s to have arbitrary values. If the `:multiple` attribute is set, then the state of this item must be a list of values or nil. Also supports the new attributes `:invalid` and `:validate`.
(textarea)
(textarea attrs)
An item representing its string state in a textual multiline input element.
Also supports the new attributes :invalid
and :validate
.
An item representing its string state in a textual multiline input element. Also supports the new attributes `:invalid` and `:validate`.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close