forge
Explore
Log in

Don't you dare go Hollow

🎨 polish nav active states with subtle glow and group highlight

Browse files at this commit

39cfc3bd3e06d49e93468962f7929e8dbdc9f2e4Burak BoduroğluParent: 7dcc8e3
  • style
    • 🎨 polish nav active states with subtle glow and group highlight
Show full message
style: 🎨 polish nav active states with subtle glow and group highlight
- add inset shadow + glow on active nav items (side + tab bar)
- highlight group heading when any child is active
src/components/layout/mobile-tab-bar.tsxmodified+2 -2
@@ -61,8 +61,8 @@ export function MobileTabBar(props: { onMenu: () => void }) {
61 >61 >
62 <span62 <span
63 class={cn(63 class={cn(
64- "flex h-8 w-12 items-center justify-center rounded-full transition-colors",64+ "flex h-8 w-12 items-center justify-center rounded-full transition-all",
65- active() ? "bg-primary/15 text-primary" : "text-muted-foreground",65+ active() ? "bg-primary/15 text-primary shadow-[inset_0_0_0_1px_hsl(var(--primary)/0.12),0_2px_8px_hsl(var(--primary)/0.12)]" : "text-muted-foreground",
66 )}66 )}
67 >67 >
68 <tab.Icon class="h-5 w-5" />68 <tab.Icon class="h-5 w-5" />
src/components/layout/side-nav.tsxmodified+4 -4
@@ -176,12 +176,12 @@ function NavLink(props: {
176 props.standalone ? "text-xs font-semibold" : "text-[13px] font-medium",176 props.standalone ? "text-xs font-semibold" : "text-[13px] font-medium",
177 props.collapsed ? "justify-center px-0 h-10 w-10 mx-auto" : props.standalone ? "gap-2.5 px-3" : "gap-2.5 pl-8 pr-3",177 props.collapsed ? "justify-center px-0 h-10 w-10 mx-auto" : props.standalone ? "gap-2.5 px-3" : "gap-2.5 pl-8 pr-3",
178 active()178 active()
179- ? "bg-primary/12 text-primary font-semibold shadow-sm"179+ ? "bg-primary/12 text-primary font-semibold shadow-[inset_0_0_0_1px_hsl(var(--primary)/0.14),0_1px_6px_hsl(var(--primary)/0.08)]"
180 : "text-sidebar-foreground/80 hover:bg-secondary hover:text-foreground",180 : "text-sidebar-foreground/80 hover:bg-secondary hover:text-foreground",
181 )}181 )}
182 >182 >
183 <Show when={active() && !props.collapsed}>183 <Show when={active() && !props.collapsed}>
184- <span class="absolute left-1 top-1/2 h-4 w-1 -translate-y-1/2 rounded-full bg-primary" />184+ <span class="absolute left-1 top-1/2 h-5 w-1 -translate-y-1/2 rounded-full bg-primary shadow-[0_0_10px_hsl(var(--primary)/0.35)]" />
185 </Show>185 </Show>
186 <props.item.Icon class={cn("h-4 w-4 shrink-0 transition-colors", active() ? "text-primary" : "text-muted-foreground")} />186 <props.item.Icon class={cn("h-4 w-4 shrink-0 transition-colors", active() ? "text-primary" : "text-muted-foreground")} />
187 <span class={cn("truncate", props.collapsed ? "sr-only" : "block min-w-0 flex-1 text-left")}>{t(props.item.labelKey)}</span>187 <span class={cn("truncate", props.collapsed ? "sr-only" : "block min-w-0 flex-1 text-left")}>{t(props.item.labelKey)}</span>
@@ -275,8 +275,8 @@ export function SideNav(props: { onNavigate?: () => void; collapsed?: boolean })
275 <button275 <button
276 type="button"276 type="button"
277 class={cn(277 class={cn(
278- "flex h-8 w-full items-center gap-2 rounded-md px-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground transition-colors duration-150 hover:bg-muted hover:text-foreground",278+ "flex h-8 w-full items-center gap-2 rounded-lg px-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-muted-foreground transition-colors duration-150 hover:bg-muted hover:text-foreground",
279- (open() || groupActive()) && "text-foreground",279+ groupActive() ? "bg-primary/[0.06] text-foreground" : open() && "text-foreground",
280 )}280 )}
281 title={t(group.labelKey)}281 title={t(group.labelKey)}
282 aria-expanded={open()}282 aria-expanded={open()}