Dom

zio.blocks.html.Dom
See theDom companion trait
object Dom

Attributes

Companion
trait
Source
Dom.scala
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Dom.type

Members list

Type members

Classlikes

object Attribute

Attributes

Companion
trait
Source
Dom.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Attribute.type
sealed trait Attribute extends Product, Serializable

Attributes

Companion
object
Source
Dom.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes

Attributes

Companion
trait
Source
Dom.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait AttributeSeparator extends Product, Serializable

Attributes

Companion
object
Source
Dom.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object Comma
class Custom
object Semicolon
object Space

Attributes

Companion
trait
Source
Dom.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait AttributeValue extends Product, Serializable

Attributes

Companion
object
Source
Dom.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class BooleanValue
class JsValue
class MultiValue
class StringValue
final case class Doctype(value: String) extends Dom

A document type declaration node.

A document type declaration node.

Renders as , typically for HTML5 documents. Doctype nodes are always rendered without indentation and are treated as leaf nodes by tree operations.

Value parameters

value

the doctype value (e.g., "html")

Attributes

Source
Dom.scala
Supertypes
trait Dom
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object Element

Attributes

Companion
trait
Source
Dom.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
Element.type
sealed trait Element extends Dom, CssSelectable

A sealed trait for HTML elements with a tag, attributes, and children.

A sealed trait for HTML elements with a tag, attributes, and children.

Subtypes include:

Elements support modifier chaining via apply(effect, ...) and when(condition)(...) for fluent construction.

Import DomModifierConversions._ (or use the zio.blocks.html package object) to enable implicit conversions from String, Dom, Dom.Attribute, etc. to DomModifier.

Attributes

Companion
object
Source
Dom.scala
Supertypes
trait Dom
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
trait Cell
trait Td
class TdElement
trait Th
class ThElement
class Generic
trait Li
class LiElement
class OptElement
class Script
trait SelectChild
trait Opt
trait Optgroup
class Style
trait Tr
class TrElement
Show all
case object Empty extends Dom

An empty DOM node that renders to nothing.

An empty DOM node that renders to nothing.

Used as a neutral element for filtering and tree operations.

Attributes

Source
Dom.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Dom
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
Empty.type
final case class Text(content: String) extends Dom

A text node containing HTML content to be escaped during rendering.

A text node containing HTML content to be escaped during rendering.

Text nodes are automatically HTML-escaped to prevent XSS attacks when rendered (except within Script and Style elements, which are unescaped).

Value parameters

content

the text content (will be HTML-escaped in output)

Attributes

Source
Dom.scala
Supertypes
trait Dom
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements.

The names of the product elements.

Attributes

Inherited from:
Mirror
Source
Mirror.scala
type MirroredLabel <: String

The name of the type.

The name of the type.

Attributes

Inherited from:
Mirror
Source
Mirror.scala

Value members

Concrete methods

def boolAttr(name: String, enabled: Boolean = ...): BooleanAttribute

Attributes

Source
Dom.scala
def multiAttr(name: String): MultiAttributeKey

Attributes

Source
Dom.scala
def multiAttr(name: String, separator: AttributeSeparator): MultiAttributeKey

Attributes

Source
Dom.scala
def multiAttr(name: String, values: Iterable[String]): Attribute

Attributes

Source
Dom.scala
def multiAttr(name: String, separator: AttributeSeparator, value: String, rest: String*): Attribute

Attributes

Source
Dom.scala
def text(content: String): Text

Attributes

Source
Dom.scala

Concrete fields

val empty: Dom

Attributes

Source
Dom.scala