Files
hemx/examples/html_examples/templates/partials/contact_card.heml
T
slhx agent b3d72e8d82 feat(examples): add hemx html pattern gallery
Add examples/html_examples as a copy-pasteable gallery for the first htmx-style HTML UX patterns using exact htmx URL slugs in the page and README. The slice covers click-to-edit, edit-row, delete-row, inline-validation, click-to-load, and active-search with .heml templates, generated resources, server-owned Rust state, and runtime-free selector targeting.

req: htmx_equivalents/001

req: htmx_equivalents/002

req: examples/001
2026-06-23 07:22:40 +02:00

16 lines
653 B
Plaintext

<article +data-key="self.id">
<div h-if="!self.editing">
<h3>{+ self.name +}</h3>
<p>{+ self.email +}</p>
<form data-hemx-handle="edit_contact" data-hemx-form="edit_contact">
<button type="submit" name="id" +value="self.id">Edit</button>
</form>
</div>
<form h-if="self.editing" data-hemx-handle="save_contact" data-hemx-form="save_contact">
<input type="hidden" name="id" +value="self.id">
<label>Name <input name="name" +value="self.name" required="required"></label>
<label>Email <input name="email" +value="self.email" required="required"></label>
<button type="submit">Save</button>
</form>
</article>