There are lots of guides and courses out there on HTMX and Alpine.js separately, but I didn't find many with the particulars of using them together for persistence of instant client-side interactions, so this is an example of such a thing. I've taken a bootstrap 5 theme from one of the marketplace sites, and made one thing in it data driven and supportive of instant user gratification, persisted to the database as user preferences in Django.
Consider the following: