vibe.web.htmx¶
HTMX utilities for out-of-band swaps.
This module provides utilities for creating HTMX out-of-band (OOB) swap elements, consolidating the patterns used throughout the web interface.
OOBSwap ¶
Represents an HTMX out-of-band swap element.
OOB swaps allow updating multiple page elements in a single response, independent of the main content being swapped.
| Attributes: |
|
|---|
render ¶
render() -> str
Render the OOB swap as an HTML div element.
| Returns: |
|
|---|
render_oob_div ¶
render_oob_div(element_id: str | None, swap: str, content: str = '', *, css_class: str | None = None, style: str | None = None) -> str
Render a generic HTMX out-of-band swap div.
This is a convenience function that creates an OOBSwap and renders it.
| Parameters: |
|
|---|
| Returns: |
|
|---|