HtmlAttrs

ff4s.HtmlAttrs
trait HtmlAttrs

Attributes

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

Members list

Value members

Concrete methods

protected def boolAsOnOffHtmlAttr(name: String): HtmlAttr[Boolean]

Attributes

Source
HtmlAttrs.scala
protected def boolAsPresenceHtmlAttr(name: String): HtmlAttr[Boolean]

Attributes

Source
HtmlAttrs.scala
protected def boolAsTrueFalseHtmlAttr(name: String): HtmlAttr[Boolean]

Attributes

Source
HtmlAttrs.scala
protected def boolAsYesNoHtmlAttr(name: String): HtmlAttr[Boolean]

Attributes

Source
HtmlAttrs.scala
protected def doubleHtmlAttr(name: String): HtmlAttr[Double]

Attributes

Source
HtmlAttrs.scala
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

Source
HtmlAttrs.scala
protected def intHtmlAttr(name: String): HtmlAttr[Int]

Attributes

Source
HtmlAttrs.scala
protected def stringHtmlAttr(name: String): HtmlAttr[String]

Attributes

Source
HtmlAttrs.scala

Concrete fields

lazy val `type`: HtmlAttr[String]

This attribute has several meanings depending on what element it's applied to.

This attribute has several meanings depending on what element it's applied to. It could indicate the type of a button, an input, a script, a stylesheet, etc.

Aliases: typ, tpe

- input#input_types @ MDN - button#type @ MDN - object#type @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val accept: HtmlAttr[String]

If the value of the type attribute is file, this attribute indicates the types of files that the server accepts; otherwise it is ignored.

If the value of the type attribute is file, this attribute indicates the types of files that the server accepts; otherwise it is ignored.

accept @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val accessKey: HtmlAttr[String]

Specifies a shortcut key to activate/focus an element

Specifies a shortcut key to activate/focus an element

accesskey @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val action: HtmlAttr[String]

The URI of a program that processes the information submitted via the form.

The URI of a program that processes the information submitted via the form. This value can be overridden by a formAction attribute on a button or input element.

Only applies to FormTags.form

action @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val alt: HtmlAttr[String]

This attribute defines the alternative text describing the image.

This attribute defines the alternative text describing the image. Users will see this displayed if the image URL is wrong, the image is not in one of the supported formats, or until the image is downloaded.

alt @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val autoCapitalize: HtmlAttr[String]

This is a nonstandard attribute used by Chrome and iOS Safari Mobile, which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user.

This is a nonstandard attribute used by Chrome and iOS Safari Mobile, which controls whether and how the text value should be automatically capitalized as it is entered/edited by the user.

Possible values: "none" | "sentences" | "words" | "characters"

autocapitalize @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val autoComplete: HtmlAttr[String]

This attribute indicates whether the value of the control can be automatically completed by the browser.

This attribute indicates whether the value of the control can be automatically completed by the browser. This attribute is ignored if the value of the type attribute is hidden, checkbox, radio, file, or a button type (button, submit, reset, image).

autocomplete @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val autoFocus: HtmlAttr[Boolean]

This Boolean attribute lets you specify that a form control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control.

This Boolean attribute lets you specify that a form control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control. Only one form element in a document can have the autofocus attribute, which is a Boolean. It cannot be applied if the type attribute is set to hidden (that is, you cannot automatically set focus to a hidden control).

autofocus @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val charset: HtmlAttr[String]

Declares the character encoding of the page or script.

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

- meta#charset @ MDN - script#charset @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val colSpan: HtmlAttr[Int]

This attribute contains a non-negative integer value that indicates for how many columns the cell extends.

This attribute contains a non-negative integer value that indicates for how many columns the cell extends. Its default value is 1; if its value is set to 0, it extends until the end of the `, even if implicitly defined, that the cell belongs to. Values higher than 1000 will be considered as incorrect and will be set to the default value (1). [[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/td#attr-colspan td#attr-colspan @ MDN]]

Attributes

Source
HtmlAttrs.scala
lazy val cols: HtmlAttr[Int]

The visible width of text input or <textArea>, in average character widths.

The visible width of text input or <textArea>, in average character widths. If it is specified, it must be a positive integer. If it is not specified, the default value is 20 (HTML5).

textarea#attr-cols @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val contentAttr: HtmlAttr[String]

This attribute gives the value associated with the name or httpEquiv attribute, of a <meta> element, depending on which of those attributes is defined on that element.

This attribute gives the value associated with the name or httpEquiv attribute, of a <meta> element, depending on which of those attributes is defined on that element.

meta#attr-content @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val contentEditable: HtmlAttr[Boolean]

Indicates whether the element should be editable by the user.

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

contentEditable @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val contextMenuId: HtmlAttr[String]

Specifies a context menu for an element by its element id.

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

contextmenu @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val crossOrigin: HtmlAttr[String]

This attribute specifies how the browser should handle cross-origin requests for the associated resource.

This attribute specifies how the browser should handle cross-origin requests for the associated resource. It controls whether the resource can be loaded when requested from a different domain, and how to handle potential security issues, like CORS (Cross-Origin Resource Sharing) policies. The value of this attribute determines whether the browser will allow or block loading of the resource, helping to enhance web security.

Allowed values: "anonymous" | "use-credentials" | "" (same as "anonymous")

crossorigin @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val defaultChecked: HtmlAttr[Boolean]

When the value of the type attribute is "radio" or "checkbox", the presence of this Boolean attribute indicates that the control is selected **by default**; otherwise it is ignored.

When the value of the type attribute is "radio" or "checkbox", the presence of this Boolean attribute indicates that the control is selected **by default**; otherwise it is ignored.

See Props.checked

checkbox#attr-checked @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val defaultSelected: HtmlAttr[Boolean]

Indicates whether this

Attributes

Source
HtmlAttrs.scala
lazy val defaultValue: HtmlAttr[String]

The initial value of the control.

The initial value of the control. This attribute is optional except when the value of the type attribute is radio or checkbox.

See also Props.value

input#value @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val dir: HtmlAttr[String]

Specifies the text direction for the content in an element.

Specifies the text direction for the content in an element. The valid values are:

- ltr Default. Left-to-right text direction

- rtl Right-to-left text direction

- auto Let the browser figure out the text direction, based on the content, (only recommended if the text direction is unknown)

dir @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val disabled: HtmlAttr[Boolean]

This Boolean attribute indicates that the form control is not available for interaction.

This Boolean attribute indicates that the form control is not available for interaction. In particular, the click event will not be dispatched on disabled controls. Also, a disabled control's value isn't submitted with the form.

This attribute is ignored if the value of the type attribute is hidden.

disabled @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val download: HtmlAttr[String]

Prompts the user to save the linked URL instead of navigating to it.

Prompts the user to save the linked URL instead of navigating to it. Can be used with or without a value:

- Without a value, the browser will suggest a filename/extension, generated from various sources:

  • The Content-Disposition HTTP header

  • The final segment in the URL path

  • The media type (from the Content-Type header, the start of a data: URL, or Blob.type for a blob: URL) - Defining a value suggests it as the filename. / and \ characters are converted to underscores (_). Filesystems may forbid other characters in filenames, so browsers will adjust the suggested name if necessary.

a#attr-download @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val draggable: HtmlAttr[Boolean]

Specifies whether an element is draggable or not

Specifies whether an element is draggable or not

draggable @ MDN

Attributes

Source
HtmlAttrs.scala
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

Source
HtmlAttrs.scala
lazy val encType: HtmlAttr[String]

The enctype attribute provides the encoding type of the form when it is submitted (for forms with a method of "POST").

The enctype attribute provides the encoding type of the form when it is submitted (for forms with a method of "POST").

Only applies to FormTags.form

form#attr-enctype @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val forId: HtmlAttr[String]

Describes an element which belongs to this one.

Describes an element which belongs to this one. Used on labels and output elements.

for @ MDN

Attributes

Source
HtmlAttrs.scala
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.

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.

input#formaction @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val formEncType: HtmlAttr[String]

The formenctype attribute provides the encoding type of the form when it is submitted (for forms with a method of "POST") and overrides the default enctype attribute of the form element.

The formenctype attribute provides the encoding type of the form when it is submitted (for forms with a method of "POST") and overrides the default enctype attribute of the form element. This should be used only with the input elements of type "submit" or "image"

Enumerated: "multipart/form-data" | "text/plain" | "application/x-www-form-urlencoded" (default)

input#formenctype @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val formId: HtmlAttr[String]

The form attribute specifies an ID of the form an ` element belongs to.

The form attribute specifies an ID of the form an ` element belongs to.

Attributes

Source
HtmlAttrs.scala
lazy val formMethod: HtmlAttr[String]

The formmethod attribute specifies the HTTP Method the form should use when it is submitted and overrides the default method attribute of the form element.

The formmethod attribute specifies the HTTP Method the form should use when it is submitted and overrides the default method attribute of the form element. This should be used only with the input elements of type "submit" or "image".

Enumerated: "post" | "get"

input#formmethod @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val formNoValidate: HtmlAttr[Boolean]

The formnovalidate Boolean attribute specifies that the input of the form should not be validated upon submit and overrides the default novalidate attribute of the form.

The formnovalidate Boolean attribute specifies that the input of the form should not be validated upon submit and overrides the default novalidate attribute of the form. This should only be used with input elements of of type "submit".

input#formnovalidate @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val formTarget: HtmlAttr[String]

The formtarget provides a name or keyword that indicates where to display the response that is received after submitting the form and overrides the target attribute of them form element.

The formtarget provides a name or keyword that indicates where to display the response that is received after submitting the form and overrides the target attribute of them form element. This should only be used with the input elements of type "submit" or "image"

Enumerated: "_blank" | "_parent" | "_top" | "_self" (default)

input#formtarget @ MDN

Attributes

Source
HtmlAttrs.scala
lazy val heightAttr: HtmlAttr[Int]

The height attribute specifies the pixel height of the following elements: <canvas>, <embed>, <iframe>, , , ,