HtmlProps

ff4s.HtmlProps
trait HtmlProps

Attributes

Source
HtmlProps.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object html.type

Members list

Value members

Concrete methods

protected def boolProp(name: String): HtmlProp[Boolean, Boolean]

Attributes

Source
HtmlProps.scala
def htmlProp[V, DomV](name: String, codec: Codec[V, DomV]): HtmlProp[V, DomV]

Create custom HTML element property

Create custom HTML element property

Type parameters

DomV

- value type for this prop in the underlying JS DOM.

V

- value type for this prop in Scala

Value parameters

codec

- used to encode V into DomV, e.g. StringAsIsCodec,

name

- name of the prop in JS, e.g. "value"

Attributes

Source
HtmlProps.scala
protected def stringProp(name: String): HtmlProp[String, String]

Attributes

Source
HtmlProps.scala

Concrete fields

lazy val checked: HtmlProp[Boolean, Boolean]

When the value of the type attribute is "radio" or "checkbox", this property determines whether it is checked or not.

When the value of the type attribute is "radio" or "checkbox", this property determines whether it is checked or not. This is different from checked _attribute_, which contains the _initial_ checked status of the element. More info: https://stackoverflow.com/a/6004028/2601788 (checked behaves similar to value)

See also: defaultChecked prop / attribute

Attributes

Source
HtmlProps.scala
lazy val indeterminate: HtmlProp[Boolean, Boolean]

In addition to the checked and unchecked states, there is a third state a checkbox can be in: indeterminate.

In addition to the checked and unchecked states, there is a third state a checkbox can be in: indeterminate. This is a state in which it's impossible to say whether the item is toggled on or off.

checkbox#Indeterminate_state_checkboxes @ MDN

Attributes

Source
HtmlProps.scala
lazy val selected: HtmlProp[Boolean, Boolean]

Indicates whether an

Indicates whether an

Attributes

Source
HtmlProps.scala
lazy val value: HtmlProp[String, String]

Current value of the element.

Current value of the element. This is different from value _attribute_, which contains the _initial_ value of the element. More info: https://stackoverflow.com/a/6004028/2601788

See also: defaultValue prop / attribute

Attributes

Source
HtmlProps.scala