About Mero UI
Mero UI is a component library for developers who build interfaces with server-rendered HTML and htmx.
How the components work
Choose a component, copy its HTML into your template and load the assets listed with the example. For a button that fetches data or a form that saves a record, point its htmx attributes at a route that returns HTML.
What happens after a save?
Try an invalid edit in the inventory playground. The server sends back the form with the values you entered. The drawer stays open and focus moves to the field that needs fixing. Open the HTTP exchange to see the response that made it happen.
Why Mero?
The name comes from the Greek méros (μέρος), meaning “part.” With htmx, a single row in a table can be the part your server sends back.
Say you change the quantity of an inventory item and click Save. The form’s hx-post attribute tells htmx where to send the edit. Your server saves the quantity and returns the updated row as HTML. With hx-target pointing to the row and hx-swap="outerHTML", htmx replaces that row in place.
Mero gives you the markup and styles for the form and the table. Your server can use the same row template to render the full table on the first visit and a single row after an edit. See the official htmx documentation.