Created
July 26, 2022 07:00
-
-
Save bmihelac/1fda3bd253d3d3ec0c1f89a934c410dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div x-data="{ count: 0, replaced: false, | |
message: 'Change me, then press the button!' }"> | |
<input type="text" x-model="message"> | |
<div x-text="count"></div> | |
<button x-bind:style="replaced && {'backgroundColor': '#fecaca'}" | |
x-on:click="replaced = true; count++" | |
hx-get="/swap"> | |
Morph | |
</button> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment