zio.http.htmx

package zio.http.htmx

Members list

Packages

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Source
BuildInfo.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
BuildInfo.type
object HtmxAttrKey

Attributes

Companion
class
Source
HtmxAttrKey.scala
Supertypes
class Object
trait Matchable
class Any
Self type
final class HtmxAttrKey[-A]

Typed key for a single HTMX attribute.

Typed key for a single HTMX attribute.

Unlike zio.blocks.html.AttributeKey, this key carries the expected value type for the attribute itself. This keeps rich HTMX attributes such as hx-swap, hx-trigger, and hx-target from silently accepting unrelated raw strings while still allowing explicit URL/string surfaces where HTMX itself expects them.

Attributes

Companion
object
Source
HtmxAttrKey.scala
Supertypes
class Object
trait Matchable
class Any

Mixin providing the typed HTMX hx-* attribute DSL for zio.blocks.html.

Mixin providing the typed HTMX hx-* attribute DSL for zio.blocks.html.

Typical usage is through the package object via import zio.http.htmx._. Attribute keys in this trait delegate value rendering to ToHtmxValue, so custom domain values can participate in the DSL by defining their own instances.

Event-handler attributes are exposed through hxOn, which writes literal JavaScript expressions to hx-on:* attributes instead of generic string values.

Most attributes are intentionally narrower than plain HTML strings. For example, hxSwap accepts HxSwap, hxTarget accepts HxTarget, and selector-only attributes accept CssSelector. This makes accidental stringly misuse fail at compile time while keeping explicit URL/string surfaces for request attributes.

Attributes

Source
HtmxAttributes.scala
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
class
Source
HxAttributeValues.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class HxAttributeNames

Space-separated set of HTMX attribute names rendered for hx-disinherit.

Space-separated set of HTMX attribute names rendered for hx-disinherit.

Attributes

Companion
object
Source
HxAttributeValues.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
sealed trait HxEncoding extends Product, Serializable

Encodings supported by the hx-encoding attribute.

Encodings supported by the hx-encoding attribute.

The current DSL exposes HTMX's explicit multipart form encoding for requests that include file uploads or other multipart data.

HTMX's default URL-encoded form behavior is represented by omitting the attribute entirely, so there is no separate DSL value for the default case.

Attributes

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

Attributes

Companion
trait
Source
HxEncoding.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
HxEncoding.type
final case class HxExtensions

Comma-separated set of HTMX extension names rendered for hx-ext.

Comma-separated set of HTMX extension names rendered for hx-ext.

Attributes

Companion
object
Source
HxAttributeValues.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object HxExtensions

Attributes

Companion
class
Source
HxAttributeValues.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Companion
class
Source
HxAttributeValues.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class HxHeadersValue

Schema-backed or raw-JSON value for hx-headers.

Schema-backed or raw-JSON value for hx-headers.

Use from to encode a schema-backed value to JSON, or json when you already have a Json value.

Attributes

Companion
object
Source
HxAttributeValues.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final class HxOnKey

Typed key for an hx-on:* attribute bound to a specific event name.

Typed key for an hx-on:* attribute bound to a specific event name.

Attributes

Companion
object
Source
HtmxAttributes.scala
Supertypes
class Object
trait Matchable
class Any
object HxOnKey

Attributes

Companion
class
Source
HtmxAttributes.scala
Supertypes
class Object
trait Matchable
class Any
Self type
HxOnKey.type
object HxParams

Attributes

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

Typed parameter inclusion strategies for the hx-params attribute.

Typed parameter inclusion strategies for the hx-params attribute.

Attributes

Companion
object
Source
HxParams.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object All
object None
class Not
class Only
sealed trait HxSwap extends Product, Serializable

Typed representation of an hx-swap value.

Typed representation of an hx-swap value.

Start from one of the predefined strategies such as HxSwap.InnerHTML or HxSwap.AfterEnd, then add modifiers like swap, settle, transition, scroll, show, ignoreTitle, and focusScroll.

Attributes

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

Attributes

Companion
trait
Source
HxSwap.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
HxSwap.type
object HxSwapOob

Attributes

Companion
class
Source
HxAttributeValues.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
HxSwapOob.type
final case class HxSwapOob

Typed value for hx-swap-oob.

Typed value for hx-swap-oob.

The value can be a simple boolean flag or a swap strategy optionally scoped to a selector.

Attributes

Companion
object
Source
HxAttributeValues.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class HxSync(target: HxTarget, strategy: HxSyncStrategy)

Typed hx-sync value pairing a target selector with a synchronization strategy.

Typed hx-sync value pairing a target selector with a synchronization strategy.

Attributes

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

Attributes

Companion
class
Source
HxSync.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
HxSync.type
sealed trait HxSyncStrategy extends Product, Serializable

Synchronization strategies supported by the hx-sync attribute.

Synchronization strategies supported by the hx-sync attribute.

Attributes

Companion
object
Source
HxSync.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object Abort
object Drop
object Queue
object Replace

Attributes

Companion
trait
Source
HxSync.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
object HxTarget

Attributes

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

Typed representation of the target selector forms accepted by HTMX.

Typed representation of the target selector forms accepted by HTMX.

These values are used by attributes such as hx-target, hx-include, and hx-sync.

Attributes

Companion
object
Source
HxTarget.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class Closest
class Css
class Find
class Next
class Previous
object This
Show all
object HxTrigger

Attributes

Companion
class
Source
HxTrigger.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
HxTrigger.type
final case class HxTrigger extends HxTriggerValue

Typed representation of a single hx-trigger declaration.

Typed representation of a single hx-trigger declaration.

A trigger starts with an event name and can be refined with an optional JavaScript filter plus normalized modifier groups such as delay, throttle, source selector, queue strategy, threshold, or root selector.

Attributes

Companion
object
Source
HxTrigger.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object HxTriggerSet

Attributes

Companion
class
Source
HxTrigger.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class HxTriggerSet(triggers: Chunk[HxTrigger]) extends HxTriggerValue

Rendered collection of comma-separated HTMX triggers.

Rendered collection of comma-separated HTMX triggers.

Attributes

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

Attributes

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

Common rendered shape for hx-trigger values.

Common rendered shape for hx-trigger values.

Attributes

Companion
object
Source
HxTrigger.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
class HxTrigger
class HxTriggerSet
sealed trait HxUrlUpdate extends Product, Serializable

Typed values for HTMX URL-bearing attributes such as hx-push-url and hx-replace-url.

Typed values for HTMX URL-bearing attributes such as hx-push-url and hx-replace-url.

Attributes

Companion
object
Source
HxAttributeValues.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Known subtypes
object Disabled
object Enabled
class Url
object HxUrlUpdate

Attributes

Companion
trait
Source
HxAttributeValues.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class HxVals

Schema-backed or raw-JSON value for hx-vals.

Schema-backed or raw-JSON value for hx-vals.

Use from to encode a schema-backed value to JSON, or json when you already have a Json value.

Attributes

Companion
object
Source
HxAttributeValues.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object HxVals

Attributes

Companion
class
Source
HxAttributeValues.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
HxVals.type
final class PartialHxOn

Partial builder for event-specific hx-on:* attributes.

Partial builder for event-specific hx-on:* attributes.

Attributes

Source
HtmxAttributes.scala
Supertypes
class Object
trait Matchable
class Any
trait ToHtmxValue[-A]

Type class for rendering typed HTMX DSL values into raw attribute strings.

Type class for rendering typed HTMX DSL values into raw attribute strings.

HtmxAttrKey#:= requires an implicit instance of this type class for the value being assigned. The module ships instances for common primitives, selectors, paths, URLs, JSON values, and the richer HTMX ADTs defined in this package.

Attributes

Companion
object
Source
ToHtmxValue.scala
Supertypes
class Object
trait Matchable
class Any
object ToHtmxValue

Attributes

Companion
trait
Source
ToHtmxValue.scala
Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Inherited methods

def hxDisinherit(first: String, rest: String*): Attribute

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala
def hxExt(first: String, rest: String*): Attribute

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Inherited fields

lazy val hxBoost: HtmxAttrKey[Boolean]

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala
lazy val hxConfirm: HtmxAttrKey[String]

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala
lazy val hxDisable: HtmxAttrKey[Boolean]

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala
lazy val hxHistory: HtmxAttrKey[Boolean]

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala
lazy val hxOn: PartialHxOn

Builder for event-specific hx-on:* attributes.

Builder for event-specific hx-on:* attributes.

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala
lazy val hxPreserve: HtmxAttrKey[Boolean]

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala
lazy val hxPrompt: HtmxAttrKey[String]

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala
lazy val hxValidate: HtmxAttrKey[Boolean]

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala

Attributes

Inherited from:
HtmxAttributes
Source
HtmxAttributes.scala