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
- Adjust nav active indicator to overlap navbar border - Add orange accent color to TOC active indicator via CSS variable scoping - Prevent TOC header from being cut off by adjusting top offset - Add mobile sidebar trigger for docs pages Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sushmithamallesh committed
Jan 19, 2026 at 00:04 UTC
46a337174dd28b05e87317ff8aaf0e734ce56e16
2 files changed
+30
-3
docs/app/(home)/docs/layout.tsx
+14
-1
@@ -1,5 +1,7 @@
1
import { source } from '@/lib/source';
2
import { DocsLayout } from 'fumadocs-ui/layouts/docs';
3
+import { SidebarTrigger } from 'fumadocs-ui/components/sidebar/base';
4
+import { Menu } from 'lucide-react';
5
6
// Insert changelog into page tree at correct position (after capabilities, before Tools and Triggers)
7
const changelogPage = { type: 'page' as const, name: 'Changelog', url: '/docs/changelog' };
@@ -12,11 +14,22 @@ const pageTree = {
14
) as typeof source.pageTree.children,
15
};
16
17
+// Minimal mobile header - only shows sidebar trigger, hidden on desktop
18
+function MobileSidebarNav() {
19
+ return (
20
+ <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">
21
+ <SidebarTrigger className="p-2 -ml-2 rounded-md hover:bg-fd-accent">
22
+ <Menu className="size-5" />
23
+ </SidebarTrigger>
24
+ </header>
25
+ );
26
+}
27
+
28
export default function Layout({ children }: LayoutProps<'/docs'>) {
29
return (
30
<DocsLayout
31
tree={pageTree}
19
- nav={{ enabled: false, title: null }}
32
+ nav={{ enabled: true, title: null, component: <MobileSidebarNav /> }}
33
searchToggle={{ enabled: false }}
34
sidebar={{ collapsible: false, footer: null }}
35
themeSwitch={{ enabled: false }}
docs/app/global.css
+16
-2
@@ -387,7 +387,7 @@ textarea:focus-visible {
387
outline-offset: 2px;
388
}
389
390
-/* Active nav link - orange indicator sits above the navbar border */
390
+/* Active nav link - orange indicator overlaps the navbar border */
391
#nd-nav nav > a[data-active="true"] {
392
color: var(--composio-orange);
393
position: relative;
@@ -396,7 +396,7 @@ textarea:focus-visible {
396
#nd-nav nav > a[data-active="true"]::after {
397
content: '';
398
position: absolute;
399
- bottom: 0;
399
+ bottom: -0.5rem; /* Extend down to overlap navbar border */
400
left: 0;
401
right: 0;
402
height: 2px;
@@ -469,6 +469,20 @@ nav a[href*="app.composio"]:focus-visible {
469
outline-offset: 2px;
470
}
471
472
+/* ==========================================================================
473
+ Table of Contents (Right Sidebar)
474
+ ========================================================================== */
475
+
476
+/* Prevent "On this page" from being cut off by header */
477
+#nd-toc {
478
+ top: 4rem;
479
+}
480
+
481
+/* TOC - scope primary color to orange for active indicator */
482
+#nd-toc {
483
+ --color-fd-primary: var(--composio-orange);
484
+}
485
+
486
@layer base {
487
* {
488
@apply border-border outline-ring/50;