@devries-cameron20 / composio-1 / commits / a16bc33a4
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

remove nav navigation

Sushmithamallesh committed Dec 23, 2025 at 15:58 UTC a16bc33a4dd194481e1c9ca9e7840bed318fa4af
2 files changed +130
fumadocs/components/nav-tabs.tsx new
+38
@@ -0,0 +1,38 @@
1 +'use client';
2 +
3 +import Link from 'next/link';
4 +import { usePathname } from 'next/navigation';
5 +
6 +const tabs = [
7 + { href: '/docs', label: 'Docs', exact: true },
8 + { href: '/docs/api', label: 'API' },
9 + { href: '/docs/examples', label: 'Examples' },
10 +];
11 +
12 +export function NavTabs() {
13 + const pathname = usePathname();
14 +
15 + const isActive = (href: string, exact?: boolean) => {
16 + if (exact) {
17 + // For "Docs", only active if exactly /docs or /docs/ but not /docs/api
18 + return pathname === href || pathname === `${href}/` ||
19 + (pathname.startsWith('/docs') && !pathname.startsWith('/docs/api') && !pathname.startsWith('/docs/examples'));
20 + }
21 + return pathname.startsWith(href);
22 + };
23 +
24 + return (
25 + <div className="nav-tabs">
26 + {tabs.map((tab) => (
27 + <Link
28 + key={tab.href}
29 + href={tab.href}
30 + className={`nav-tab ${isActive(tab.href, tab.exact) ? 'active' : ''}`}
31 + >
32 + {tab.label}
33 + </Link>
34 + ))}
35 + </div>
36 + );
37 +}
38 +
fumadocs/components/top-nav.tsx new
+92
@@ -0,0 +1,92 @@
1 +'use client';
2 +
3 +import Link from 'next/link';
4 +import Image from 'next/image';
5 +import { usePathname } from 'next/navigation';
6 +
7 +const navItems = [
8 + { href: '/docs', label: 'Docs' },
9 + { href: '/docs/api', label: 'API' },
10 + { href: '/docs/examples', label: 'Examples' },
11 +];
12 +
13 +export function TopNav() {
14 + const pathname = usePathname();
15 +
16 + const isActive = (href: string) => {
17 + if (href === '/docs') {
18 + return pathname === '/docs' ||
19 + (pathname.startsWith('/docs') &&
20 + !pathname.startsWith('/docs/api') &&
21 + !pathname.startsWith('/docs/examples'));
22 + }
23 + return pathname.startsWith(href);
24 + };
25 +
26 + return (
27 + <header className="sticky top-0 z-50 border-b border-fd-border bg-fd-background">
28 + <div className="flex h-14 items-center px-6 gap-6">
29 + {/* Logo */}
30 + <Link href="/" className="flex items-center">
31 + <Image
32 + src="/Composio Logo.svg"
33 + alt="Composio"
34 + width={110}
35 + height={20}
36 + className="dark:hidden"
37 + priority
38 + />
39 + <Image
40 + src="/Composio Logo Dark.svg"
41 + alt="Composio"
42 + width={110}
43 + height={20}
44 + className="hidden dark:block"
45 + priority
46 + />
47 + </Link>
48 +
49 + {/* Nav Items */}
50 + <nav className="flex items-center gap-1">
51 + {navItems.map((item) => (
52 + <Link
53 + key={item.href}
54 + href={item.href}
55 + className={`px-3 py-1.5 text-sm font-medium rounded-md transition-colors ${
56 + isActive(item.href)
57 + ? 'text-[var(--orange)]'
58 + : 'text-fd-muted-foreground hover:text-fd-foreground'
59 + }`}
60 + >
61 + {item.label}
62 + </Link>
63 + ))}
64 + </nav>
65 +
66 + {/* Spacer */}
67 + <div className="flex-1" />
68 +
69 + {/* Right side links */}
70 + <div className="flex items-center gap-4">
71 + <Link
72 + href="https://github.com/ComposioHQ/composio"
73 + target="_blank"
74 + rel="noopener noreferrer"
75 + className="text-sm text-fd-muted-foreground hover:text-fd-foreground"
76 + >
77 + GitHub
78 + </Link>
79 + <Link
80 + href="https://app.composio.dev"
81 + target="_blank"
82 + rel="noopener noreferrer"
83 + className="text-sm text-fd-muted-foreground hover:text-fd-foreground"
84 + >
85 + Platform
86 + </Link>
87 + </div>
88 + </div>
89 + </header>
90 + );
91 +}
92 +