HtmlAttrs

trait HtmlAttrs
class Object
trait Matchable
class Any

Value members

Concrete methods

protected def boolAsOnOffHtmlAttr(key: String): HtmlAttr[Boolean]
protected def boolAsTrueFalseHtmlAttr(key: String): HtmlAttr[Boolean]
def htmlAttr[V](key: String, codec: Codec[V, String]): HtmlAttr[V]

Create HTML attribute (Note: for SVG attrs, use L.svg.svgAttr)

Create HTML attribute (Note: for SVG attrs, use L.svg.svgAttr)

Type parameters:
V
  • value type for this attr in Scala
Value parameters:
codec
  • used to encode V into String, e.g. StringAsIsCodec
key
  • name of the attribute, e.g. "value"
protected def intHtmlAttr(key: String): HtmlAttr[Int]
protected def stringHtmlAttr(key: String): HtmlAttr[String]

Concrete fields

lazy val `type`: HtmlAttr[String]

This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as text/html, text/css, and so on. The common use of this attribute is to define the type of style sheet linked and the most common current value is text/css, which indicates a Cascading Style Sheet format. You can use tpe as an alias for this attribute so you don't have to backtick-escape this attribute.

This attribute is used to define the type of the content linked to. The value of the attribute should be a MIME type such as text/html, text/css, and so on. The common use of this attribute is to define the type of style sheet linked and the most common current value is text/css, which indicates a Cascading Style Sheet format. You can use tpe as an alias for this attribute so you don't have to backtick-escape this attribute.

See also:
lazy val charset: HtmlAttr[String]

Declares the character encoding of the page or script. Used on meta and script elements.

Declares the character encoding of the page or script. Used on meta and script elements.

See also:
lazy val contentEditable: HtmlAttr[Boolean]

Indicates whether the element should be editable by the user. If so, the browser modifies its widget to allow editing.

Indicates whether the element should be editable by the user. If so, the browser modifies its widget to allow editing.

See also:
lazy val contextMenuId: HtmlAttr[String]

Specifies a context menu for an element by its element id. The context menu appears when a user right-clicks on the element

Specifies a context menu for an element by its element id. The context menu appears when a user right-clicks on the element

See also:
lazy val dropZone: HtmlAttr[String]

Specifies whether the dragged data is copied, moved, or linked, when dropped Acceptable values: copy | move | link

Specifies whether the dragged data is copied, moved, or linked, when dropped Acceptable values: copy | move | link

lazy val formId: HtmlAttr[String]

The form attribute specifies an ID of the form an <input> element belongs to.

The form attribute specifies an ID of the form an <input> element belongs to.

lazy val heightAttr: HtmlAttr[Int]

The height attribute specifies the pixel height of the following elements: <canvas>, <embed>, <iframe>, <img>, <input type="image">, <object>, <video>

The height attribute specifies the pixel height of the following elements: <canvas>, <embed>, <iframe>, <img>, <input type="image">, <object>, <video>

See also:
lazy val listId: HtmlAttr[String]

Identifies a list of pre-defined options to suggest to the user. The value must be the id of a FormTags.dataList element in the same document. The browser displays only options that are valid values for this input element. This attribute is ignored when the type attribute's value is hidden, checkbox, radio, file, or a button type.

Identifies a list of pre-defined options to suggest to the user. The value must be the id of a FormTags.dataList element in the same document. The browser displays only options that are valid values for this input element. This attribute is ignored when the type attribute's value is hidden, checkbox, radio, file, or a button type.

lazy val maxAttr: HtmlAttr[String]

The max attribute specifies the maximum value for an element of type number, range, date, datetime, datetime-local, month, time, or week.

The max attribute specifies the maximum value for an element of type number, range, date, datetime, datetime-local, month, time, or week.

See also:
lazy val minAttr: HtmlAttr[String]

The min attribute specifies the minimum value for an element of type number, range, date, datetime, datetime-local, month, time, or week.

The min attribute specifies the minimum value for an element of type number, range, date, datetime, datetime-local, month, time, or week.

See also:
lazy val stepAttr: HtmlAttr[String]

The step attribute specifies the numeric intervals for an element that should be considered legal for the input. For example, if step is 2 on a number typed then the legal numbers could be -2, 0, 2, 4, 6 etc. The step attribute should be used in conjunction with the min and max attributes to specify the full range and interval of the legal values. The step attribute is applicable to elements of the following types: number, range, date, datetime, datetime-local, month, time and week.

The step attribute specifies the numeric intervals for an element that should be considered legal for the input. For example, if step is 2 on a number typed then the legal numbers could be -2, 0, 2, 4, 6 etc. The step attribute should be used in conjunction with the min and max attributes to specify the full range and interval of the legal values. The step attribute is applicable to elements of the following types: number, range, date, datetime, datetime-local, month, time and week.

See also:
lazy val tpe: HtmlAttr[String]
lazy val typ: HtmlAttr[String]
lazy val unselectable: HtmlAttr[Boolean]

IE-specific property to prevent user selection

IE-specific property to prevent user selection

lazy val widthAttr: HtmlAttr[Int]

The width attribute specifies the pixel width of the following elements: <canvas>, <embed>, <iframe>, <img>, <input type="image">, <object>, <video>

The width attribute specifies the pixel width of the following elements: <canvas>, <embed>, <iframe>, <img>, <input type="image">, <object>, <video>

See also: