HtmlBuilders

trait HtmlBuilders extends HtmlAttrBuilder[[V] =>> ReactiveHtmlAttr[V]] with ReflectedHtmlAttrBuilder[[V, DomV] =>> ReactiveProp[V, DomV]] with PropBuilder[[V, DomV] =>> ReactiveProp[V, DomV]] with EventPropBuilder[[Ev <: Event] =>> ReactiveEventProp[Ev], Event] with StyleBuilders[StyleSetter] with HtmlTagBuilder[[Ref <: Element] =>> HtmlTag[Ref], Element]
trait HtmlTagBuilder[[Ref <: Element] =>> HtmlTag[Ref], Element]
trait StyleBuilders[StyleSetter]
trait EventPropBuilder[[Ev <: Event] =>> ReactiveEventProp[Ev], Event]
trait PropBuilder[[V, DomV] =>> ReactiveProp[V, DomV]]
trait ReflectedHtmlAttrBuilder[[V, DomV] =>> ReactiveProp[V, DomV]]
trait HtmlAttrBuilder[[V] =>> ReactiveHtmlAttr[V]]
class Object
trait Matchable
class Any

Value members

Concrete methods

override protected def buildDoubleStyleSetter(style: Style[Double], value: Double): StyleSetter
Definition Classes
StyleBuilders
override protected def buildIntStyleSetter(style: Style[Int], value: Int): StyleSetter
Definition Classes
StyleBuilders
override protected def buildStringStyleSetter(style: Style[_], value: String): StyleSetter
Definition Classes
StyleBuilders
@inline
def customEventProp[Ev <: Event](key: String): ReactiveEventProp[Ev]

Create custom event property

Create custom event property

Type Params
Ev
  • event type in JS, e.g. js.dom.MouseEvent
Value Params
key
  • event type in JS, e.g. "click"
@inline
def customHtmlAttr[V](key: String, codec: Codec[V, String]): ReactiveHtmlAttr[V]

Create custom HTML attr (Note: for SVG attrs, use L.svg.customSvgAttr)

Create custom HTML attr (Note: for SVG attrs, use L.svg.customSvgAttr)

Type Params
V
  • value type for this attr in Scala
Value Params
codec
  • used to translate V <-> String, e.g. StringAsIsCodec,
key
  • name of the attribute, e.g. "value"
@inline
def customHtmlTag[Ref <: Element](tagName: String): HtmlTag[Ref]

Note: this simply creates an instance of HtmlTag.

Note: this simply creates an instance of HtmlTag.

Type Params
Ref
  • type of elements with this tag, e.g. dom.html.Input for "input" tag
Value Params
tagName
  • e.g. "div" or "mwc-input"
@inline
def customProp[V, DomV](key: String, codec: Codec[V, DomV]): ReactiveProp[V, DomV]

Create custom HTML element property

Create custom HTML element property

Type Params
DomV
  • value type for this prop in the underlying JS DOM.
V
  • value type for this prop in Scala
Value Params
codec
  • used to translate V <-> DomV, e.g. StringAsIsCodec,
key
  • name of the prop in JS, e.g. "value"
@inline
def customStyle[V](key: String): ReactiveStyle[V]

Create custom CSS property

Create custom CSS property

Type Params
V
  • type of values recognized by JS for this property, e.g. Int Note: String is always allowed regardless of the type you put here. If unsure, use String type as V.
Value Params
key
  • name of CSS property, e.g. "font-weight"
override protected def eventProp[Ev <: Event](key: String): ReactiveEventProp[Ev]
Definition Classes
EventPropBuilder
override protected def htmlAttr[V](key: String, codec: Codec[V, String]): ReactiveHtmlAttr[V]
Definition Classes
HtmlAttrBuilder
override protected def htmlTag[Ref <: Element](tagName: String, void: Boolean): HtmlTag[Ref]
Definition Classes
HtmlTagBuilder
override protected def prop[V, DomV](key: String, codec: Codec[V, DomV]): ReactiveProp[V, DomV]
Definition Classes
PropBuilder
override protected def reflectedAttr[V, DomPropV](attrKey: String, propKey: String, attrCodec: Codec[V, String], propCodec: Codec[V, DomPropV]): ReactiveProp[V, DomPropV]
Definition Classes
ReflectedHtmlAttrBuilder
override protected def style[V](key: String): Style[V]
Definition Classes
StyleBuilders

Inherited methods

@inline
protected def booleanReflectedAttr(key: String, attrCodec: Codec[Boolean, String]): ReactiveProp[Boolean, Boolean]
Inherited from
ReflectedHtmlAttrBuilder
@inline
protected def booleanReflectedAttr(attrKey: String, propKey: String, attrCodec: Codec[Boolean, String]): ReactiveProp[Boolean, Boolean]
Inherited from
ReflectedHtmlAttrBuilder
@inline
protected def doubleHtmlAttr(key: String): ReactiveHtmlAttr[Double]
Inherited from
HtmlAttrBuilder
@inline
protected def doubleProp(key: String): ReactiveProp[Double, Double]
Inherited from
PropBuilder
@inline
protected def doubleReflectedAttr(key: String): ReactiveProp[Double, Double]
Inherited from
ReflectedHtmlAttrBuilder
@inline
protected def htmlTag[Ref <: Element](tagName: String): HtmlTag[Ref]
Inherited from
HtmlTagBuilder
@inline
protected def intHtmlAttr(key: String): ReactiveHtmlAttr[Int]
Inherited from
HtmlAttrBuilder
@inline
protected def intProp(key: String): ReactiveProp[Int, Int]
Inherited from
PropBuilder
@inline
protected def intReflectedAttr(key: String): ReactiveProp[Int, Int]
Inherited from
ReflectedHtmlAttrBuilder
@inline
protected def intReflectedAttr(attrKey: String, propKey: String): ReactiveProp[Int, Int]
Inherited from
ReflectedHtmlAttrBuilder
@inline
protected def stringHtmlAttr(key: String): ReactiveHtmlAttr[String]
Inherited from
HtmlAttrBuilder
@inline
protected def stringProp(key: String): ReactiveProp[String, String]
Inherited from
PropBuilder
@inline
protected def stringReflectedAttr(key: String): ReactiveProp[String, String]
Inherited from
ReflectedHtmlAttrBuilder
@inline
protected def stringReflectedAttr(attrKey: String, propKey: String): ReactiveProp[String, String]
Inherited from
ReflectedHtmlAttrBuilder