@devries-cameron20 / composio-1 / commits / 83b274bfc
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.

docs: improve quickstart selector discoverability

Users were missing the framework and integration type selectors on the quickstart page. Wrap both in a single bordered card with labels ("Choose your framework", "Choose your integration type") and add an "Other providers" link card pointing to /docs/providers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Sushmitha Mallesh committed Mar 5, 2026 at 11:50 UTC 83b274bfc5df80c38c9eac517e762f57fdc592e3
2 files changed +41 -10
docs/components/quickstart/integration-tabs.tsx
+28 -8
@@ -3,7 +3,8 @@
3 import Image from 'next/image';
4 import Link from 'next/link';
5 import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
6 -import { ReactNode } from 'react';
6 +import { ReactNode, useEffect, useState } from 'react';
7 +import { createPortal } from 'react-dom';
8
9 interface TabConfig {
10 value: string;
@@ -23,10 +24,17 @@ interface IntegrationTabsProps {
24 tabs?: TabConfig[];
25 }
26
26 -export function IntegrationTabs({ children, defaultValue, tabs = defaultTabs }: IntegrationTabsProps) {
27 - return (
28 - <Tabs defaultValue={defaultValue ?? tabs[0]?.value ?? 'native'} className="not-prose -mt-2">
29 - <div className="mb-5 flex items-center gap-3">
27 +function IntegrationTabsHeader({ tabs }: { tabs: TabConfig[] }) {
28 + const [portalTarget, setPortalTarget] = useState<HTMLElement | null>(null);
29 +
30 + useEffect(() => {
31 + setPortalTarget(document.getElementById('integration-tabs-portal'));
32 + }, []);
33 +
34 + const header = (
35 + <div className="mt-4 border-t border-fd-border pt-4">
36 + <p className="mb-3 text-sm font-medium text-fd-muted-foreground">Choose your integration type · <Link href="/docs/native-tools-vs-mcp" className="text-fd-muted-foreground hover:text-fd-foreground transition-colors underline underline-offset-2">Use this guide to decide</Link></p>
37 + <div className="flex items-center gap-3">
38 <TabsList>
39 {tabs.map((tab) => (
40 <TabsTrigger key={tab.value} value={tab.value} className="gap-2">
@@ -52,10 +60,22 @@ export function IntegrationTabs({ children, defaultValue, tabs = defaultTabs }:
60 </TabsTrigger>
61 ))}
62 </TabsList>
55 - <Link href="/docs/native-tools-vs-mcp" className="text-xs text-fd-muted-foreground hover:text-fd-foreground transition-colors">
56 - Which should I use?
57 - </Link>
63 </div>
64 + </div>
65 + );
66 +
67 + if (portalTarget) {
68 + return createPortal(header, portalTarget);
69 + }
70 +
71 + // Fallback: render inline if portal target not found
72 + return <div className="mb-5">{header}</div>;
73 +}
74 +
75 +export function IntegrationTabs({ children, defaultValue, tabs = defaultTabs }: IntegrationTabsProps) {
76 + return (
77 + <Tabs defaultValue={defaultValue ?? tabs[0]?.value ?? 'native'} className="not-prose">
78 + <IntegrationTabsHeader tabs={tabs} />
79 {children}
80 </Tabs>
81 );
docs/components/quickstart/quickstart-flow.tsx
+13 -2
@@ -1,6 +1,7 @@
1 'use client';
2
3 import Image from 'next/image';
4 +import Link from 'next/link';
5 import {
6 createContext,
7 useContext,
@@ -157,9 +158,10 @@ export function QuickstartFlow({ children }: QuickstartFlowProps) {
158
159 return (
160 <QuickstartContext.Provider value={contextValue}>
160 - {/* Framework selector */}
161 + {/* Framework + integration type selector */}
162 {frameworks.length > 0 && (
162 - <div className="not-prose mb-6">
163 + <div className="not-prose mb-6 rounded-lg border border-fd-border bg-fd-card/50 p-4">
164 + <p className="mb-3 text-sm font-medium text-fd-muted-foreground">Choose your framework</p>
165 <div className="grid grid-cols-2 gap-3 sm:grid-cols-4">
166 {frameworks.map((framework) => (
167 <FrameworkCard
@@ -172,7 +174,16 @@ export function QuickstartFlow({ children }: QuickstartFlowProps) {
174 onSelect={() => setSelectedId(framework.id)}
175 />
176 ))}
177 + <Link
178 + href="/docs/providers"
179 + className="flex items-center gap-3 rounded-lg border border-dashed border-fd-border px-3 py-2.5 text-left transition-all hover:bg-fd-accent/50 hover:border-fd-muted-foreground"
180 + >
181 + <span className="flex h-6 w-6 shrink-0 items-center justify-center text-fd-muted-foreground">→</span>
182 + <span className="text-sm font-medium text-fd-muted-foreground">Other providers</span>
183 + </Link>
184 </div>
185 + {/* Portal target for integration tabs header */}
186 + <div id="integration-tabs-portal" />
187 </div>
188 )}
189