Skip to content

Commit 4d50c1f

Browse files
committed
feat(animation): add accordion animations for better UX
1 parent 35e3a35 commit 4d50c1f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/app/global.css

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@
4646
--color-sidebar-ring: var(--sidebar-ring);
4747
--animate-ripple: ripple var(--duration, 2s) ease calc(var(--i, 0) * 0.2s)
4848
infinite;
49+
--animate-accordion-down: accordion-down 0.2s ease-out;
50+
--animate-accordion-up: accordion-up 0.2s ease-out;
4951
@keyframes ripple {
5052
0%,
5153
100% {
@@ -55,6 +57,22 @@
5557
transform: translate(-50%, -50%) scale(0.9);
5658
}
5759
}
60+
@keyframes accordion-down {
61+
from {
62+
height: 0;
63+
}
64+
to {
65+
height: var(--radix-accordion-content-height);
66+
}
67+
}
68+
@keyframes accordion-up {
69+
from {
70+
height: var(--radix-accordion-content-height);
71+
}
72+
to {
73+
height: 0;
74+
}
75+
}
5876
}
5977

6078
:root {

0 commit comments

Comments
 (0)