Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

fix: sidebar menu selection effect fixed and matched with global css

Arghya Dasf6933e0c2a05
diff --git a/components/sidebar-nav.tsx b/components/sidebar-nav.tsx
index 88d6e3ed..c3a23ec0 100644
--- a/components/sidebar-nav.tsx
+++ b/components/sidebar-nav.tsx
@@ -60,7 +60,7 @@ export function DocsSidebarNavItems({
item.disabled && "cursor-not-allowed opacity-60",
pathname === item.href
? "font-medium text-foreground"
- : "text-muted-foreground",
+ : "text-muted-foreground"
)}
target={item.external ? "_blank" : ""}
rel={item.external ? "noreferrer" : ""}
@@ -68,7 +68,7 @@ export function DocsSidebarNavItems({
{pathname === item.href && (
<motion.div
layoutId={groupId}
- className="absolute inset-0 rounded-r-md border-l-2 border-border"
+ className="absolute inset-0 rounded-r-md border-l-2 border-primary/70 bg-secondary"
initial={false}
transition={{
type: "spring",
@@ -99,7 +99,7 @@ export function DocsSidebarNavItems({
key={index}
className={cn(
"flex w-full cursor-not-allowed items-center rounded-md p-2 text-muted-foreground",
- item.disabled && "cursor-not-allowed opacity-60",
+ item.disabled && "cursor-not-allowed opacity-60"
)}
>
{item.title}
@@ -114,7 +114,7 @@ export function DocsSidebarNavItems({
</span>
)}
</span>
- ),
+ )
)}
</div>
) : null;