This example uses B4X,
Output:
- specifically MiniHTML library
- cross over HTMX to generate interactive HTML
- based on Modal Dialogs in Bootstrap example on HTMX website
- to demonstrate mix usage of HTMX and Bootstrap 5 javascript
- served by B4J server through helper functions from WebApiUtils v3 library.
B4X:
Button.attribute2(CreateMap("hx-get": "/modal", _
"hx-target": "#modals-here", _
"hx-trigger": "click", _
"data-bs-toggle": "modal", _
"data-bs-target": "#modals-here", _
"class": "btn btn-primary text-uppercase")) _
.Text("Open Modal")
Output:
B4X:
<button hx-get="/modal" hx-target="#modals-here" hx-trigger="click" data-bs-toggle="modal" data-bs-target="#modals-here" class="btn btn-primary text-uppercase">Open Modal</button>