HtmlAttrs

com.raquo.laminar.defs.attrs.HtmlAttrs
trait HtmlAttrs

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Laminar

Members list

Value members

Concrete methods

protected def boolAsOnOffHtmlAttr(name: String): HtmlAttr[Boolean]
protected def boolAsTrueFalseHtmlAttr(name: String): HtmlAttr[Boolean]
def htmlAttr[V](name: 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
name
  • name of the attribute, e.g. "value"

Attributes

protected def intHtmlAttr(name: String): HtmlAttr[Int]
protected def stringHtmlAttr(name: 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.

Attributes

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.

Attributes

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.

Attributes

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

Attributes

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

Attributes

lazy val formAction: HtmlAttr[String]

The formaction attribute provides the URL that will process the input control when the form is submitted and overrides the default action attribute of the form element. This should be used only with input elements of type submit or image.

The formaction attribute provides the URL that will process the input control when the form is submitted and overrides the default action attribute of the form element. This should be used only with input elements of type submit or image.

Attributes

See also
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.

Attributes

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>

Attributes

See also
lazy val href: HtmlAttr[String]

This is the single required attribute for anchors defining a hypertext source link. It indicates the link target, either a URL or a URL fragment. A URL fragment is a name preceded by a hash mark (#), which specifies an internal target location (an ID) within the current document. URLs are not restricted to Web (HTTP)-based documents. URLs might use any protocol supported by the browser. For example, file, ftp, and mailto work in most user agents.

This is the single required attribute for anchors defining a hypertext source link. It indicates the link target, either a URL or a URL fragment. A URL fragment is a name preceded by a hash mark (#), which specifies an internal target location (an ID) within the current document. URLs are not restricted to Web (HTTP)-based documents. URLs might use any protocol supported by the browser. For example, file, ftp, and mailto work in most user agents.

Attributes

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.

Attributes

lazy val maxAttr: HtmlAttr[String]

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

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

Attributes

See also
lazy val minAttr: HtmlAttr[String]

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

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

Attributes

See also
lazy val src: HtmlAttr[String]

Specifies the URL of an image for <img> tag, for type="image" input buttons, or the URL of some other network resources like <iframe>.

Specifies the URL of an image for <img> tag, for type="image" input buttons, or the URL of some other network resources like <iframe>.

Attributes

See also
lazy val stepAttr: HtmlAttr[String]

The step attribute specifies the numeric intervals for an <input> element that should be considered legal for the input. For example, if step is 2 on a number typed <input> 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 <input> elements of the following types: number, range, date, datetime, datetime-local, month, time and week.

The step attribute specifies the numeric intervals for an <input> element that should be considered legal for the input. For example, if step is 2 on a number typed <input> 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 <input> elements of the following types: number, range, date, datetime, datetime-local, month, time and week.

Attributes

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

Attributes

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>

Attributes

See also