Please login to access all of the features of the Community Site.

Attribute Reference

Every Hx.* attribute in one table, plus the reserved values you can put in them.

Attributes

AttributeTypeInheritsApplies toDetails
Hx.GetstringNoany ViewRequests and Targeting
Hx.PoststringNoany ViewRequests and Targeting
Hx.PutstringNoany ViewRequests and Targeting
Hx.DeletestringNoany View.Requests and Targeting
Hx.TargetstringYesany View. The target it names has type requirements.Requests and Targeting
Hx.SwapstringYesany View. Constrains the target's type.Requests and Targeting
Hx.IdstringNoany ViewRequests and Targeting
Hx.TriggerstringNoany View. Named events need the control to declare them.Triggers
Hx.IncludeRock:Parameter listNoany ViewForms and Values
Hx.ParamsstringYesany View, and its subtreeForms and Values
Hx.ValidatorValidatorYesany ViewForms and Values
Hx.IndicatorstringYesany View. Names any View.Indicators and Errors
Hx.ConfirmstringYesany ViewIndicators and Errors
Hx.PromptstringYesany ViewIndicators and Errors
Hx.NotificationstringYesany View. The slot must be a ContentView or Layout.Indicators and Errors
Hx.DisabledEltstringYesany View. One id, not a list.Indicators and Errors
Hx.DisableboolApplies to the subtreeany elementIndicators and Errors
Hx.HeadersstringYesany Viewbelow
Hx.DisinheritstringNoany ViewInheritance
Hx.PageTitlestringNoa response fragment's root onlyCover Sheets

Note

Hx.* only works on visual elements. Setting a verb or Hx.Id on something that is not one, such as a context menu action or a toolbar item, is ignored.

Hx.Headers

The one attribute without a home elsewhere. Extra request headers, written as a query string, not JSON.

<Button Text="Load"
        Hx.Get="^/sink/rows"
        Hx.Headers="X-Sink-Mode=compact&X-Sink-Page=2" />

Inherits: yes. Your headers are applied after the standard Helix headers, so deliberately overriding a standard header works. Read them from the Headers merge field.

Reserved values

Hx.Target

ValueMeaning
an Hx.Id or x:Namethat element, anywhere on the page
thisthe element that carries the attribute, which is the declaring ancestor when inherited
coversheetpresent the fragment in a cover sheet
unsetthe enclosing block, or the sheet host inside a cover sheet

Hx.Swap

ValueThe target must be
inner (default)a ContentView or a Layout
outerany View whose parent is a Layout or ContentView
appenda Layout
prependa Layout
afterany View whose parent is a flow Layout, not Grid or AbsoluteLayout
noneanything

Hx.Swap modifiers

Order-independent, and applied after the strategy token. An unrecognized modifier is an error, unlike a Hx.Trigger modifier.

ValueBehavior
animate:<name>none, fade, slide-up, slide-down, slide-left, slide-right, scale. collapse and expand are deferred and swap instantly.
swap:<time>Exit duration. Default 150ms.
settle:<time>Enter duration. Default 200ms.
easing:<name>linear, ease-in, ease-out, ease-in-out, spring, bounce. Overrides both halves.
distance:<units>slide-* travel in device-independent units. Default 24. A bare number, no unit suffix.

Only inner and outer animate the exit. A duration declared without animate: is inert rather than an error. Platform reduce-motion collapses every animation to an instant swap.

Hx.Trigger events

ValueBehavior
unsetnatural interaction
tap, tapped, clickednatural interaction, written explicitly
loadonce, when the element enters the tree
appearevery time the containing page appears, first appearance included
a MAUI event namewired by name, case-insensitively
every, revealed, intersectnot implemented, wires nothing

Hx.Trigger modifiers

ValueBehavior
onceonly the first activation fires
changedonly when the control's value changed
delay:<time>debounce
throttle:<time>rate limit

Times accept 400ms, 2s, or bare milliseconds. from:, target:, consume, and queue are parsed and ignored.

Hx.Params

none is the only value. Anything else is ignored.

Hx.Disinherit

Space- or comma-separated attribute names with or without the Hx. prefix, or * for all.

Case sensitivity, in one place

This trips people up because it is not uniform.

Case-sensitiveCase-insensitive
Hx.Id values, and the Hx.Target / Hx.Indicator / Hx.DisabledElt / Hx.Notification / HX-Retarget ids that resolve against themthis and coversheet
swap strategy names, including HX-Reswap values
Hx.Params="none"
Hx.Disinherit tokens
Hx.Trigger event names
response header names

Request headers the app sends

HeaderValue
X-Helix-ClientRockMobile
X-Helix-Shell-Versionthe app version, for example 20.0.0
X-Helix-CSRF-Protectiontrue
X-Helix-Promptthe Hx.Prompt entry, when one was shown

Plus anything from Hx.Headers, and standard Rock authentication.

Response headers the app honors

HeaderBehavior
HX-Redirectnavigate, short-circuits the swap
HX-Refreshtrue reloads the page, short-circuits the swap
HX-Retargetoverride the target id
HX-Reswapoverride the swap strategy
X-Helix-Command / X-Helix-Command-Parameterrun a client command after the swap

HX-Location, HX-Push-Url, HX-Replace-Url, and HX-Trigger do nothing. See Endpoint Responses.

Mobile-only vocabulary

If you are porting from web Helix, this is the delta.

PieceWhy it exists
Hx.IdFills the role of the DOM id, since there are no CSS selectors to target with.
Hx.PageTitleFills the role of HTMX's <title> handling.
Hx.ValidatorA pre-request gate against the existing Validator control.
Hx.NotificationDeclares where request errors render.
HelixFormThe container analog of web Helix's lava-form, not of an HTMX attribute.
coversheet targetThe nearest web pattern is targeting a modal.
X-Helix-Command headersResponse-driven client commands.
X-Helix-Client, X-Helix-Shell-Version, X-Helix-PromptThe mobile shape of HX-Request and HX-Prompt, plus app version gating.