From 9acf289b11e82d1bd65b6c875f7315ffb72ae025 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Tue, 29 Sep 2026 14:44:16 +0200 Subject: [PATCH] feat(web): mark the active phone tab with a bar that springs between tabs The phone tab bars (resume builder, letter builder, dashboard) drop the pill behind the active icon for a short accent bar on the tab's top edge. Switching tabs springs it across with a little overshoot (spring 0.4s, bounce 0.3); reduced motion moves it at once. Dashboard tab taps swap the page without the cross-fade, like a native tab bar, so the bar's movement isn't hidden behind the page transition. --- .../components/layout/mobile-tab-indicator.tsx | 18 ++++++++++++++++++ apps/web/src/libs/motion.ts | 3 +++ .../$resumeId/-components/editor-shell.tsx | 13 ++++--------- .../letter/-components/letter-shell.tsx | 13 ++++--------- .../routes/dashboard/-components/app-shell.tsx | 11 ++++++++--- 5 files changed, 37 insertions(+), 21 deletions(-) create mode 100644 apps/web/src/components/layout/mobile-tab-indicator.tsx diff --git a/apps/web/src/components/layout/mobile-tab-indicator.tsx b/apps/web/src/components/layout/mobile-tab-indicator.tsx new file mode 100644 index 000000000..30c00dc53 --- /dev/null +++ b/apps/web/src/components/layout/mobile-tab-indicator.tsx @@ -0,0 +1,18 @@ +import { m } from "motion/react"; +import { TAB_SPRING } from "@/libs/motion"; + +/** + * The phone tab bar's marker: a short accent bar on the active tab's top edge. Render it inside the active tab + * (which must be `relative`); when another tab becomes active it springs across to it. Reduced motion moves it at + * once (see `followReducedMotion`). + */ +export function MobileTabIndicator() { + return ( +