Skip to content

Commit 1fe13d0

Browse files
committed
Added a transition indicator for form submit
1 parent dfe5f55 commit 1fe13d0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

internal/app/action/astatic/json.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,12 @@
119119
.htmx-indicator {
120120
opacity: 0;
121121
transition: opacity 200ms ease-in;
122+
}
123+
124+
#ActionMessage {
125+
transition: filter 80ms ease-in-out;
126+
}
127+
128+
#ActionMessage.htmx-swapping {
129+
filter: blur(5px); /* Apply blur effect */
122130
}

internal/app/action/form.go.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
type="submit"
7777
hx-post="{{ .path }}"
7878
hx-target="#ActionMessage"
79-
hx-swap="innerHTML"
79+
hx-swap="innerHTML swap:80ms transform:out 30ms, transform:in 50ms"
8080
hx-indicator="#ActionIndicator"
8181
class="btn btn-primary w-full">
8282
Run

0 commit comments

Comments
 (0)