@devries-cameron20 / composio Mirror · read-only / commits / 6776ad6da
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.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 17:00 UTC

Redesign header with improved UX and visual hierarchy

- Add custom theme toggle component (shadcn-style sun/moon button) - Rename "Guide" to "Docs", remove "Playground" link - Add GitHub icon and Dashboard CTA button to header - Move Dashboard to far right corner as primary CTA - Improve spacing: 2rem logo-nav gap, tighter nav item gaps - Add visual hierarchy: font-weight 500, orange underline on active - Ensure consistent 36px touch targets on all interactive elements - Add focus-visible states for accessibility - Improve muted text contrast in light/dark modes - Unify hover states with 0.15s ease transitions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Sushmithamallesh committed Dec 29, 2025 at 14:00 UTC 6776ad6da0ab1d3573a1c36be22dbf7d118659b6
3 files changed +205 -5
fumadocs/app/global.css
+152 -2
@@ -35,7 +35,7 @@
35 --color-fd-background: #ffffff;
36 --color-fd-foreground: #171414;
37 --color-fd-muted: #f6f4f2;
38 - --color-fd-muted-foreground: #726f6f;
38 + --color-fd-muted-foreground: #5c5858; /* Improved contrast */
39 --color-fd-border: #e5e0df;
40 --color-fd-card: #ffffff;
41 --color-fd-card-foreground: #171414;
@@ -57,7 +57,7 @@
57 --color-fd-background: #1a1815;
58 --color-fd-foreground: #e8e4e0;
59 --color-fd-muted: #2a2725;
60 - --color-fd-muted-foreground: #9a9590;
60 + --color-fd-muted-foreground: #a8a29e; /* Improved contrast */
61 --color-fd-border: #3d3935;
62 --color-fd-card: #1a1815;
63 --color-fd-card-foreground: #e8e4e0;
@@ -172,3 +172,153 @@ a:focus-visible {
172 padding: 1rem;
173 border-radius: 0 var(--radius) var(--radius) 0;
174 }
175 +
176 +/* ==========================================================================
177 + Header Components
178 + ========================================================================== */
179 +
180 +/* Shared transition timing */
181 +:root {
182 + --header-transition: 0.15s ease;
183 +}
184 +
185 +/* Header spacing & rhythm */
186 +#nd-nav {
187 + gap: 2rem;
188 +}
189 +
190 +/* Nav links container */
191 +#nd-nav nav {
192 + gap: 0.25rem;
193 +}
194 +
195 +/* Nav link items - consistent height (36px touch target) */
196 +#nd-nav nav > a {
197 + display: inline-flex;
198 + align-items: center;
199 + height: 2.25rem;
200 + padding: 0 0.75rem;
201 + font-size: 0.875rem;
202 + font-weight: 500;
203 + color: var(--color-fd-muted-foreground);
204 + border-radius: 0.375rem;
205 + transition: color var(--header-transition), background var(--header-transition);
206 +}
207 +
208 +#nd-nav nav > a:hover {
209 + color: var(--color-fd-foreground);
210 + background: var(--color-fd-accent);
211 +}
212 +
213 +#nd-nav nav > a:focus-visible {
214 + outline: 2px solid var(--composio-orange);
215 + outline-offset: 2px;
216 +}
217 +
218 +/* Active nav link - underline style */
219 +#nd-nav nav > a[data-active="true"] {
220 + color: var(--composio-orange);
221 + position: relative;
222 +}
223 +
224 +#nd-nav nav > a[data-active="true"]:hover {
225 + background: transparent;
226 +}
227 +
228 +#nd-nav nav > a[data-active="true"]::after {
229 + content: '';
230 + position: absolute;
231 + bottom: -0.25rem;
232 + left: 0.75rem;
233 + right: 0.75rem;
234 + height: 2px;
235 + background: var(--composio-orange);
236 + border-radius: 1px;
237 +}
238 +
239 +/* Right side items - consistent gaps */
240 +#nd-nav > div:last-child {
241 + gap: 0.5rem;
242 +}
243 +
244 +/* Theme toggle button */
245 +.theme-toggle-btn {
246 + display: inline-flex;
247 + align-items: center;
248 + justify-content: center;
249 + width: 2.25rem;
250 + height: 2.25rem;
251 + border: none;
252 + background: transparent;
253 + border-radius: 0.375rem;
254 + color: var(--color-fd-muted-foreground);
255 + cursor: pointer;
256 + transition: color var(--header-transition), background var(--header-transition);
257 +}
258 +
259 +.theme-toggle-btn:hover {
260 + color: var(--color-fd-foreground);
261 + background: var(--color-fd-accent);
262 +}
263 +
264 +.theme-toggle-btn:focus-visible {
265 + outline: 2px solid var(--composio-orange);
266 + outline-offset: 2px;
267 +}
268 +
269 +/* GitHub icon link */
270 +#nd-nav a[href*="github.com"] {
271 + display: inline-flex;
272 + align-items: center;
273 + justify-content: center;
274 + width: 2.25rem;
275 + height: 2.25rem;
276 + border-radius: 0.375rem;
277 + color: var(--color-fd-muted-foreground);
278 + transition: color var(--header-transition), background var(--header-transition);
279 +}
280 +
281 +#nd-nav a[href*="github.com"]:hover {
282 + color: var(--color-fd-foreground);
283 + background: var(--color-fd-accent);
284 +}
285 +
286 +#nd-nav a[href*="github.com"]:focus-visible {
287 + outline: 2px solid var(--composio-orange);
288 + outline-offset: 2px;
289 +}
290 +
291 +/* Search toggle - match style */
292 +#nd-nav [data-search-toggle] {
293 + height: 2.25rem;
294 + border-radius: 0.375rem;
295 + transition: border-color var(--header-transition);
296 +}
297 +
298 +#nd-nav [data-search-toggle]:focus-visible {
299 + outline: 2px solid var(--composio-orange);
300 + outline-offset: 2px;
301 +}
302 +
303 +/* Dashboard button - CTA with consistent height */
304 +nav a[href*="app.composio"] {
305 + display: inline-flex;
306 + align-items: center;
307 + height: 2.25rem;
308 + padding: 0 0.875rem;
309 + background: var(--color-fd-primary);
310 + color: var(--color-fd-primary-foreground);
311 + border-radius: 0.375rem;
312 + font-size: 0.8125rem;
313 + font-weight: 500;
314 + transition: opacity var(--header-transition);
315 +}
316 +
317 +nav a[href*="app.composio"]:hover {
318 + opacity: 0.9;
319 +}
320 +
321 +nav a[href*="app.composio"]:focus-visible {
322 + outline: 2px solid var(--composio-orange);
323 + outline-offset: 2px;
324 +}
fumadocs/components/theme-toggle.tsx new
+29
@@ -0,0 +1,29 @@
1 +'use client';
2 +
3 +import { Moon, Sun } from 'lucide-react';
4 +import { useTheme } from 'next-themes';
5 +import { useEffect, useState } from 'react';
6 +
7 +export function ThemeToggle() {
8 + const { setTheme, resolvedTheme } = useTheme();
9 + const [mounted, setMounted] = useState(false);
10 +
11 + useEffect(() => {
12 + setMounted(true);
13 + }, []);
14 +
15 + return (
16 + <button
17 + type="button"
18 + className="theme-toggle-btn"
19 + onClick={() => setTheme(resolvedTheme === 'dark' ? 'light' : 'dark')}
20 + aria-label="Toggle theme"
21 + >
22 + {mounted && resolvedTheme === 'dark' ? (
23 + <Sun className="size-[18px]" />
24 + ) : (
25 + <Moon className="size-[18px]" />
26 + )}
27 + </button>
28 + );
29 +}
fumadocs/lib/layout.shared.tsx
+24 -3
@@ -1,5 +1,6 @@
1 import type { BaseLayoutProps } from 'fumadocs-ui/layouts/shared';
2 import Image from 'next/image';
3 +import { ThemeToggle } from '@/components/theme-toggle';
4
5 // Composio Logo Component with light/dark mode switching
6 function ComposioLogo() {
@@ -33,9 +34,13 @@ export function baseOptions(): BaseLayoutProps {
34 title: <ComposioLogo />,
35 transparentMode: 'top',
36 },
37 + themeSwitch: {
38 + enabled: true,
39 + component: <ThemeToggle />,
40 + },
41 links: [
42 {
38 - text: 'Guide',
43 + text: 'Docs',
44 url: '/docs',
45 active: 'nested-url',
46 },
@@ -52,8 +57,24 @@ export function baseOptions(): BaseLayoutProps {
57 url: '/examples',
58 },
59 {
55 - text: 'Playground',
56 - url: '/playground',
60 + type: 'icon',
61 + label: 'GitHub',
62 + icon: (
63 + <svg fill="currentColor" viewBox="0 0 24 24" className="size-5">
64 + <path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12" />
65 + </svg>
66 + ),
67 + text: 'GitHub',
68 + url: 'https://github.com/composiohq/composio',
69 + external: true,
70 + secondary: true,
71 + },
72 + {
73 + type: 'button',
74 + text: 'Dashboard',
75 + url: 'https://app.composio.dev',
76 + external: true,
77 + secondary: true,
78 },
79 ],
80 };