Skip to content

Commit 22de448

Browse files
samejr0ski
authored andcommitted
Improves the tab transition animation
1 parent 7c4f3c3 commit 22de448

File tree

1 file changed

+5
-1
lines changed
  • apps/webapp/app/components/primitives

1 file changed

+5
-1
lines changed

apps/webapp/app/components/primitives/Tabs.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,11 @@ export function TabButton({
209209
{shortcut && <ShortcutKey className={cn("")} shortcut={shortcut} variant={"small"} />}
210210
</div>
211211
{isActive ? (
212-
<motion.div layoutId={layoutId} className="mt-1 h-0.5 w-full bg-indigo-500" />
212+
<motion.div
213+
layoutId={layoutId}
214+
transition={{ type: "spring", stiffness: 500, damping: 30 }}
215+
className="mt-1 h-0.5 w-full bg-indigo-500"
216+
/>
213217
) : (
214218
<div className="mt-1 h-0.5 w-full bg-charcoal-500 opacity-0 transition duration-200 group-hover:opacity-100" />
215219
)}

0 commit comments

Comments
 (0)