cover.jpg

Preface

This book aims to be an introduction to HTMX, a fantastic library that lets you create interactive Web Applications.

If you’re unfamiliar with JavaScript, before reading this book I highly recommend reading my JavaScript Beginner’s Handbook.

This book was published in late 2024.

Legal

Flavio Copes, 2024. All rights reserved.

Downloaded from flaviocopes.com.

No part of this book may be reproduced, distributed, or transmitted in any form or by any means, including photocopying, recording, or other electronic or mechanical methods, without the prior written permission of the publisher.

The information in this book is for educational and informational purposes only and is not intended as legal, financial, or other professional advice. The author and publisher make no representations as to the accuracy, completeness, suitability, or validity of any information in this book and will not be liable for any errors, omissions, or delays in this information or any losses, injuries, or damages arising from its use.

This book is provided free of charge to the newsletter subscribers of Flavio Copes. It is for personal use only. Redistribution, resale, or any commercial use of this book or any portion of it is strictly prohibited without the prior written permission of the author.

If you wish to share a portion of this book, please provide proper attribution by crediting Flavio Copes and including a link to flaviocopes.com.

Introduction

HTMX is an absolutely brilliant frontend library specialized in working with HTTP requests, sending data to a server, updating the UI based on some action, and so on.

It's not meant to be a UI library like Alpine, which is more oriented at adding interactivity to a page. HTMX is still a frontend library, but it's more data-oriented, and its goal is to fully replace a UI library like React or Angular, and instead use the full power of HTML (enhanced by HTMX) and hypermedia.

Sending HTML over the wire.

In this handbook I'll explain the basic building blocks of HTMX and I'll show you how you can use those handy primitives to create Web Applications with ease.

I will explain the basics of htmx.

Learn more on the official website at https://htmx.org/docs and read the book Hypermedia Systems at https://hypermedia.systems/book/contents/

Why htmx