Active
Project:
Drupal core
Version:
main
Component:
ajax system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Sep 2026 at 11:47 UTC
Updated:
2 Sep 2026 at 11:47 UTC
Jump to comment: Most recent
HTMX 4 processes a custom tag that is meant to enclose an HTML fragment rendered for insertion into an existing page.
<hx-partial hx-target="#messages" hx-swap="beforeend">
<div class="message">New message content</div>
</hx-partial>
tags can have the following attributes:hx-target - CSS selector for where to place content
id - Shorthand alternative to hx-target. Targets the element with that ID (e.g. targets #messages)
hx-swap - Optional. Swap style (defaults to innerHTML)
Upstream documentation: hx-partial.
Create a render element plugin for hx-partial with variables for content, target and swap.
none
none
New render element
none
Comments