Skip to content

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

fix(docs): nav indicator positioning and TOC orange accent

Sushmithamallesh46a337174dd2
diff --git a/docs/app/(home)/docs/layout.tsx b/docs/app/(home)/docs/layout.tsx
index b3273bb71..efeb5dbba 100644
--- a/docs/app/(home)/docs/layout.tsx
+++ b/docs/app/(home)/docs/layout.tsx
@@ -1,5 +1,7 @@
import { source } from '@/lib/source';
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
+import { SidebarTrigger } from 'fumadocs-ui/components/sidebar/base';
+import { Menu } from 'lucide-react';
// Insert changelog into page tree at correct position (after capabilities, before Tools and Triggers)
const changelogPage = { type: 'page' as const, name: 'Changelog', url: '/docs/changelog' };
@@ -12,11 +14,22 @@ const pageTree = {
) as typeof source.pageTree.children,
};
+// Minimal mobile header - only shows sidebar trigger, hidden on desktop
+function MobileSidebarNav() {
+ return (
+ <header className="sticky top-14 z-30 flex items-center h-12 px-4 border-b bg-fd-background/80 backdrop-blur-sm md:hidden">
+ <SidebarTrigger className="p-2 -ml-2 rounded-md hover:bg-fd-accent">
+ <Menu className="size-5" />
+ </SidebarTrigger>
+ </header>
+ );
+}
+
export default function Layout({ children }: LayoutProps<'/docs'>) {
return (
<DocsLayout
tree={pageTree}
- nav={{ enabled: false, title: null }}
+ nav={{ enabled: true, title: null, component: <MobileSidebarNav /> }}
searchToggle={{ enabled: false }}
sidebar={{ collapsible: false, footer: null }}
themeSwitch={{ enabled: false }}
diff --git a/docs/app/global.css b/docs/app/global.css
index 30aa35250..e1306a56b 100644
--- a/docs/app/global.css
+++ b/docs/app/global.css
@@ -387,7 +387,7 @@ textarea:focus-visible {
outline-offset: 2px;
}
-/* Active nav link - orange indicator sits above the navbar border */
+/* Active nav link - orange indicator overlaps the navbar border */
#nd-nav nav > a[data-active="true"] {
color: var(--composio-orange);
position: relative;
@@ -396,7 +396,7 @@ textarea:focus-visible {
#nd-nav nav > a[data-active="true"]::after {
content: '';
position: absolute;
- bottom: 0;
+ bottom: -0.5rem; /* Extend down to overlap navbar border */
left: 0;
right: 0;
height: 2px;
@@ -469,6 +469,20 @@ nav a[href*="app.composio"]:focus-visible {
outline-offset: 2px;
}
+/* ==========================================================================
+ Table of Contents (Right Sidebar)
+ ========================================================================== */
+
+/* Prevent "On this page" from being cut off by header */
+#nd-toc {
+ top: 4rem;
+}
+
+/* TOC - scope primary color to orange for active indicator */
+#nd-toc {
+ --color-fd-primary: var(--composio-orange);
+}
+
@layer base {
* {
@apply border-border outline-ring/50;