Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
docs: redesign the Welcome landing around Platform / For You
Malay Vasa4a1b8c314ae1
diff --git a/docs/app/global.css b/docs/app/global.cssindex 2e448ac4a..c46678bfb 100644--- a/docs/app/global.css+++ b/docs/app/global.css@@ -1141,13 +1141,13 @@ html:not(.dark) .terminal-theme-claude {}@media (forced-colors: active) {- .audience-badge-platform {+ .product-badge-platform {background: none !important;color: CanvasText !important;-webkit-text-fill-color: CanvasText !important;}- .audience-badge-platform-border {+ .product-badge-platform-border {background: none !important;border: 1px solid CanvasText;mask: none !important;diff --git a/docs/components/home-auth-diagram.tsx b/docs/components/home-auth-diagram.tsxnew file mode 100644index 000000000..a735305c9--- /dev/null+++ b/docs/components/home-auth-diagram.tsx@@ -0,0 +1,161 @@+'use client';++import { User } from 'lucide-react';+import { useCallback, useEffect, useRef, useState } from 'react';++const LOGO_CDN = 'https://logos.composio.dev/api';++const USER_IDENTITY = {+ name: 'Ada Chen',+ userId: 'usr_9x2kLm7',+};++const ACCOUNTS = [+ { slug: 'slack', name: 'Slack', account: 'acme-workspace' },+ { slug: 'gmail', name: 'Gmail', account: '[email protected]' },+ { slug: 'linear', name: 'Linear', account: 'acme' },+];++/**+ * Orthogonal elbow connector — leaves `(sx, sy)` horizontally, steps+ * vertically at the midpoint, then runs horizontally into `(ex, ey)` with+ * rounded corners. Adapted from `connection-refresh-visual.tsx#elbowPath`+ * but taking explicit endpoints so multiple lines out of the same hub can+ * exit at staggered y-coordinates and not visually merge into a single+ * thicker line where they share the initial horizontal run.+ */+function elbowPath(sx: number, sy: number, ex: number, ey: number, r = 8): string {+ const midX = sx + (ex - sx) * 0.5;+ const dy = Math.sign(ey - sy) || 1;+ const rr = Math.min(r, Math.abs(ex - sx) / 2, Math.abs(ey - sy) / 2);+ if (rr < 1) return `M ${sx} ${sy} L ${ex} ${ey}`;+ return (+ `M ${sx} ${sy} L ${midX - rr} ${sy} ` ++ `Q ${midX} ${sy} ${midX} ${sy + dy * rr} ` ++ `L ${midX} ${ey - dy * rr} ` ++ `Q ${midX} ${ey} ${midX + rr} ${ey} ` ++ `L ${ex} ${ey}`+ );+}++/**+ * Auth-and-context mock for the docs Welcome features grid.+ *+ * One user identity card on the left is wired to three connected-account+ * cards on the right via neutral-grey elbow connectors. Paths are computed+ * from live DOM geometry (getBoundingClientRect + ResizeObserver) so the+ * wires meet the hub and cards precisely at every breakpoint. All surfaces+ * use bg-fd-card so nothing reads as recessed against the mock's own card,+ * and logos render inline without a white swatch behind them.+ */+export function AuthDiagram() {+ const rootRef = useRef<HTMLDivElement>(null);+ const hubRef = useRef<HTMLDivElement>(null);+ const cardRefs = useRef<(HTMLDivElement | null)[]>([]);+ const [paths, setPaths] = useState<string[]>([]);++ const calc = useCallback(() => {+ const root = rootRef.current;+ const hub = hubRef.current;+ if (!root || !hub) return;+ const cr = root.getBoundingClientRect();+ const from = hub.getBoundingClientRect();+ const hubX = from.right - cr.left;+ const hubYCenter = from.top + from.height / 2 - cr.top;+ const targets = cardRefs.current.filter(+ (el): el is HTMLDivElement => Boolean(el)+ );+ // Space the exit points down the hub's right edge (~7px apart for 3+ // targets) so lines leave the hub as three distinct wires instead of+ // stacking on the same y and reading as one thick line before the elbow.+ const STAGGER = 7;+ const next = targets.map((ref, i) => {+ const to = ref.getBoundingClientRect();+ const stagger = (i - (targets.length - 1) / 2) * STAGGER;+ const sy = hubYCenter + stagger;+ const ex = to.left - cr.left;+ const ey = to.top + to.height / 2 - cr.top;+ return elbowPath(hubX, sy, ex, ey);+ });+ setPaths(next);+ }, []);++ useEffect(() => {+ calc();+ // Re-measure once fonts/images settle so the initial paths land on the+ // final card positions instead of pre-load ones.+ const t = window.setTimeout(calc, 120);+ const root = rootRef.current;+ const ro = root ? new ResizeObserver(() => calc()) : null;+ if (root && ro) ro.observe(root);+ return () => {+ window.clearTimeout(t);+ ro?.disconnect();+ };+ }, [calc]);++ return (+ <div+ ref={rootRef}+ className="relative flex h-full w-full items-center justify-between overflow-hidden"+ >+ <svg+ aria-hidden="true"+ className="pointer-events-none absolute inset-0 z-0 h-full w-full text-fd-foreground/30"+ fill="none"+ >+ {paths.map((d, i) => (+ <path+ d={d}+ key={ACCOUNTS[i]?.slug ?? i}+ stroke="currentColor"+ strokeWidth={1}+ />+ ))}+ </svg>++ <div+ ref={hubRef}+ className="relative z-10 flex w-36 items-center gap-2 rounded-[6px] border border-fd-border bg-fd-card px-2.5 py-2"+ >+ <span className="flex size-6 shrink-0 items-center justify-center rounded-full bg-fd-muted">+ <User aria-hidden="true" className="size-3.5 text-fd-foreground/60" />+ </span>+ <div className="flex min-w-0 flex-col leading-tight">+ <span className="truncate font-mono text-[11px] text-fd-foreground/85">+ {USER_IDENTITY.name}+ </span>+ <span className="truncate font-mono text-[9.5px] text-fd-foreground/45">+ {USER_IDENTITY.userId}+ </span>+ </div>+ </div>++ <div className="relative z-10 flex flex-col gap-2">+ {ACCOUNTS.map((app, i) => (+ <div+ className="flex w-44 items-center gap-2 rounded-[6px] border border-fd-border bg-fd-card px-2.5 py-2"+ key={app.slug}+ ref={el => {+ cardRefs.current[i] = el;+ }}+ >+ <img+ alt=""+ aria-hidden="true"+ className="size-4 shrink-0 object-contain"+ draggable={false}+ src={`${LOGO_CDN}/${app.slug}`}+ />+ <span className="truncate font-mono text-[11px] text-fd-foreground/85">+ {app.name}+ </span>+ <span className="ml-auto truncate font-mono text-[9.5px] text-fd-foreground/45">+ {app.account}+ </span>+ </div>+ ))}+ </div>+ </div>+ );+}diff --git a/docs/components/home-features.tsx b/docs/components/home-features.tsxindex b669b0f76..f06fa4474 100644--- a/docs/components/home-features.tsx+++ b/docs/components/home-features.tsx@@ -1,45 +1,44 @@import Link from 'next/link';-import { ArrowUpRight, Check } from 'lucide-react';+import { ArrowUpRight } from 'lucide-react';import type { ReactNode } from 'react';+import { AuthDiagram } from './home-auth-diagram';++const MOCK_FADE_STYLE = {+ maskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',+ WebkitMaskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',+};const LOGO_CDN = 'https://logos.composio.dev/api';+// 10-col × 3-row grid: 29 recognizable toolkit logos plus a brand-tinted+// "+1K" cell in the final slot, ordered as a rough mixed rhythm of comms,+// project management, storage/design, and marketing/sales so no single+// category clusters visually.const TOOLKIT_LOGOS = [- 'gmail', 'slack', 'github', 'linear', 'notion', 'figma', 'stripe', 'hubspot',- 'googledrive', 'airtable', 'jira', 'discord', 'zoom', 'asana', 'salesforce',-];--const SESSION_APPS: { slug: string; name: string }[] = [- { slug: 'slack', name: 'Slack' },- { slug: 'gmail', name: 'Gmail' },- { slug: 'linear', name: 'Linear' },+ 'gmail', 'slack', 'discord', 'zoom', 'notion',+ 'linear', 'jira', 'asana', 'trello', 'clickup',+ 'github', 'gitlab', 'figma', 'canva', 'googledrive',+ 'dropbox', 'airtable', 'confluence', 'salesforce', 'hubspot',+ 'stripe', 'shopify', 'twilio', 'sendgrid', 'mailchimp',+ 'calendly', 'youtube', 'twitter', 'linkedin',];-const TRIGGER_FEED: { app: string; event: string; age: string }[] = [- { app: 'gmail', event: 'message.new', age: '2s' },- { app: 'stripe', event: 'charge.succeeded', age: '8s' },- { app: 'linear', event: 'issue.opened', age: '14s' },+const TRIGGER_FEED: { app: string; event: string }[] = [+ { app: 'gmail', event: 'message.new' },+ { app: 'stripe', event: 'charge.succeeded' },+ { app: 'linear', event: 'issue.opened' },];-const WORKBENCH_CODE = `const result = await composio.workbench.run(\`+const SANDBOX_CODE = `const result = await composio.sandbox.run(\`const issues = await tools.LINEAR_LIST_ISSUES();const summary = await ai.summarize(issues);- await tools.SLACK_POST({ channel, text: summary });+ await tools.SLACK_POST({ text: summary });\`);`;-/**- * Welcome-page capability grid. Compact card style with proper borders,- * subtle shadow on hover, and a tight single-row visual at the bottom- * of each card so the section reads as four discrete cards rather than- * a flat block.- */export function HomeFeatures() {return (- <section className="not-prose mb-14">- <SectionHeading- eyebrow="What you get"- title="Everything you need to ship production agents."- />- <div className="grid grid-cols-1 gap-5 sm:auto-rows-fr sm:grid-cols-2">+ <section className="not-prose mb-20">+ <SectionHeading title="Everything you need to ship production agents." />+ <div className="grid grid-cols-1 gap-6 sm:auto-rows-fr sm:grid-cols-2"><FeatureCardtitle="Tools that resolve by intent."description="Smart tool search over 1000+ apps, surfaced just in time with the right scope."@@ -50,7 +49,7 @@ export function HomeFeatures() {title="Auth and context, per end-user."description="OAuth, API keys, and tokens scoped to each user and refreshed automatically."href="/docs/authentication"- visual={<SessionsVisual />}+ visual={<AuthDiagram />}/><FeatureCardtitle="Listen to anything, anywhere."@@ -83,37 +82,41 @@ function FeatureCard({return (<Linkhref={href}- className="group relative flex flex-col justify-between gap-4 overflow-hidden border border-fd-border bg-fd-card p-5 no-underline shadow-[0_1px_0_rgba(15,15,15,0.04)] transition-[box-shadow,transform,border-color] duration-200 hover:-translate-y-px hover:border-fd-foreground/15 hover:shadow-[0_10px_24px_-12px_rgba(15,15,15,0.18)]"+ className="group relative flex flex-col overflow-hidden border border-fd-border bg-fd-card p-5 no-underline shadow-[0_1px_0_rgba(15,15,15,0.04)] transition-[box-shadow,transform,border-color] duration-200 hover:-translate-y-px hover:border-fd-foreground/15 hover:shadow-[0_10px_24px_-12px_rgba(15,15,15,0.18)] sm:p-6"><ArrowUpRightaria-hidden="true"- className="absolute right-4 top-4 size-3.5 text-fd-foreground/45 transition-transform group-hover:-translate-y-px group-hover:translate-x-px"+ className="absolute right-4 top-4 size-3.5 text-fd-foreground/45 transition-transform group-hover:-translate-y-px group-hover:translate-x-px sm:right-5 sm:top-5"/>-- <div className="flex flex-col gap-1 pr-5">- <h3 className="text-[18px] font-medium leading-snug tracking-[-0.01em] text-fd-foreground">+ <div className="flex flex-col gap-1.5 pr-6">+ <h3 className="text-balance text-[18px] font-medium leading-snug tracking-[-0.01em] text-fd-foreground">{title}</h3>- <p className="text-[13px] leading-[1.5] text-fd-foreground/65">+ <p className="max-w-[42ch] text-pretty text-[14px] leading-[1.55] text-fd-foreground/70">{description}</p></div>-- <div className="mt-1">{visual}</div>+ <div+ aria-hidden="true"+ className="pointer-events-none mt-6 h-40 select-none"+ style={MOCK_FADE_STYLE}+ >+ {visual}+ </div></Link>);}function ToolkitsVisual() {- // 8×2 grid: 15 recognizable toolkit logos + a brand-tinted "+1K" cell- // in the last slot. Smaller square tiles than before so the grid stays- // in the same vertical footprint while showing roughly 1.7× more logos.+ // 8×2 tile grid stretched to fill the visual pane. Tiles paint their own+ // bg-fd-card so they read as elevated on the recessed pane; the container's+ // bg-fd-border bleeds through the 1px gaps to draw hairlines between them.return (- <div className="grid grid-cols-8 gap-px overflow-hidden rounded-sm border border-fd-border bg-fd-border">+ <div className="grid h-full w-full grid-cols-10 grid-rows-3 gap-px overflow-hidden rounded-[8px] border border-fd-border bg-fd-border">{TOOLKIT_LOGOS.map((slug) => (<divkey={slug}- className="flex aspect-square items-center justify-center bg-fd-background"+ className="flex items-center justify-center bg-fd-card"><imgalt=""@@ -124,174 +127,53 @@ function ToolkitsVisual() {/></div>))}- <div className="flex aspect-square items-center justify-center bg-[var(--composio-brand)]/10 font-mono text-[10px] font-medium tracking-[-0.01em] text-[var(--composio-brand)]">+ <div className="flex items-center justify-center bg-[var(--composio-brand)]/10 font-mono text-[11px] font-medium tracking-[-0.01em] text-[var(--composio-brand)]">+1K</div></div>);}-function SessionsVisual() {- return (- <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-background font-mono text-[11px]">- <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-fd-foreground/45">- <span className="uppercase tracking-[0.04em]">user_id</span>- <span className="text-fd-foreground/75">usr_9x2kLm7</span>- </div>- <ul className="flex flex-col">- {SESSION_APPS.map((app, i) => (- <li- key={app.slug}- className={- 'flex items-center justify-between px-2.5 py-1.5' +- (i < SESSION_APPS.length - 1- ? ' border-b border-fd-border'- : '')- }- >- <span className="inline-flex items-center gap-2 text-fd-foreground/75">- <img- alt=""- aria-hidden="true"- className="size-3.5 object-contain"- draggable={false}- src={`${LOGO_CDN}/${app.slug}`}- />- {app.name}- </span>- <span className="inline-flex items-center gap-1 text-[var(--composio-brand)]">- <Check aria-hidden="true" className="size-3" />- <span className="uppercase tracking-[0.04em]">connected</span>- </span>- </li>- ))}- </ul>- </div>- );-}-function TriggersVisual() {return (- <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-background font-mono text-[11px]">- <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-fd-foreground/45">- <span className="inline-flex items-center gap-1.5">- <span className="relative inline-flex">- <span className="size-1.5 rounded-full bg-[var(--composio-brand)]" />- <span className="absolute inset-0 animate-ping rounded-full bg-[var(--composio-brand)] opacity-60" />+ <ul className="flex h-full w-full flex-col overflow-hidden rounded-[8px] border border-fd-border bg-fd-card font-mono text-[11.5px]">+ {TRIGGER_FEED.map((row, i) => (+ <li+ key={`${row.app}-${row.event}`}+ className={+ 'flex flex-1 items-center gap-3 px-4' ++ (i < TRIGGER_FEED.length - 1 ? ' border-b border-fd-border' : '')+ }+ >+ <img+ alt=""+ aria-hidden="true"+ className="size-4 object-contain"+ draggable={false}+ src={`${LOGO_CDN}/${row.app}`}+ />+ <span className="truncate">+ <span className="text-fd-foreground/45">{row.app}.</span>+ <span className="text-fd-foreground/80">{row.event}</span></span>- <span className="uppercase tracking-[0.04em]">live</span>- </span>- <span className="uppercase tracking-[0.04em]">trigger feed</span>- </div>- <ul className="flex flex-col">- {TRIGGER_FEED.map((row, i) => (- <li- key={`${row.app}-${row.event}`}- className={- 'flex items-center gap-2 px-2.5 py-1.5 text-fd-foreground/75' +- (i < TRIGGER_FEED.length - 1- ? ' border-b border-fd-border'- : '')- }- >- <img- alt=""- aria-hidden="true"- className="size-3.5 object-contain"- draggable={false}- src={`${LOGO_CDN}/${row.app}`}- />- <span className="truncate">- <span className="text-fd-foreground/45">{row.app}.</span>- <span>{row.event}</span>- </span>- <span className="ml-auto shrink-0 text-fd-foreground/35">- {row.age}- </span>- </li>- ))}- </ul>- </div>+ </li>+ ))}+ </ul>);}function WorkbenchVisual() {- // Mirrors the active workbench tile in the hero animation: outer- // composio_workbench panel with python 3.11 status, then an active- // instance card with CPU lights, task label, brand-blue "DONE" badge,- // and a fade-masked code preview.return (- <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-card font-mono">- <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-[10px]">- <span className="uppercase tracking-[0.04em] text-fd-foreground/40">- composio_workbench- </span>- <span className="inline-flex items-center gap-1 text-fd-foreground/40">- <span className="relative inline-flex">- <span className="size-1.5 rounded-full bg-[var(--composio-brand)]" />- <span className="absolute inset-0 animate-ping rounded-full bg-[var(--composio-brand)] opacity-60" />- </span>- python 3.11+ <div className="flex h-full w-full flex-col overflow-hidden rounded-[8px] border border-fd-border bg-fd-card">+ <div className="flex shrink-0 items-center gap-2 border-b border-fd-border px-3.5 py-2">+ <span className="size-1.5 rounded-full bg-fd-foreground/25" />+ <span className="font-mono text-[10.5px] tracking-[0.02em] text-fd-foreground/50">+ sandbox.ts</span></div>- <div className="bg-fd-muted">- <div className="flex items-center justify-between gap-2 border-b border-fd-border px-2.5 py-1">- <div className="flex min-w-0 items-center gap-2">- <StaticCpuLights />- <span className="truncate text-[9px] uppercase tracking-wider text-fd-foreground/50">- Run summarization- </span>- </div>- <span className="shrink-0 text-[9px] uppercase tracking-wider text-[var(--composio-brand)]">- done- </span>- </div>- <div- className="relative overflow-hidden px-2.5 py-1.5"- style={{- maskImage:- 'linear-gradient(to bottom, black 0%, black 70%, transparent 100%)',- WebkitMaskImage:- 'linear-gradient(to bottom, black 0%, black 70%, transparent 100%)',- }}- >- <pre className="overflow-hidden text-[10px] leading-[1.6] text-fd-foreground/70">- {WORKBENCH_CODE}- </pre>- </div>- </div>- </div>- );-}--function StaticCpuLights() {- // 4×2 grid of brand-blue cells; each cell runs the `hero-cpu-pulse`- // keyframe with a staggered delay so they ripple out of phase, mimicking- // the noise-driven CpuLights in the demo zone — but cheap CSS-only.- const cells = Array.from({ length: 8 });- return (- <div- className="grid shrink-0 gap-[1px]"- style={{- gridTemplateColumns: 'repeat(4, 4px)',- gridTemplateRows: 'repeat(2, 4px)',- }}- >- {cells.map((_, i) => {- const col = i % 4;- const row = Math.floor(i / 4);- // Diagonal-ish stagger so cells light up in a wave.- const delay = (col * 120 + row * 60) % 720;- return (- <span- key={i}- className="bg-[var(--composio-brand)]"- style={{- animation: `hero-cpu-pulse 1.4s ease-in-out ${delay}ms infinite`,- }}- />- );- })}+ <pre className="flex-1 overflow-hidden bg-fd-muted/30 px-3.5 py-2.5 font-mono text-[10.5px] leading-[1.7] text-fd-foreground/70">+ {SANDBOX_CODE}+ </pre></div>);}@@ -301,17 +183,19 @@ export function SectionHeading({id,title,}: {- eyebrow: string;+ eyebrow?: string;id?: string;title: string;}) {return (<div className="mb-5 flex flex-col gap-1.5">- <span className="font-mono text-[10.5px] uppercase tracking-[0.08em] text-fd-foreground/55">- {eyebrow}- </span>+ {eyebrow && (+ <span className="font-mono text-[10.5px] uppercase tracking-[0.08em] text-fd-foreground/55">+ {eyebrow}+ </span>+ )}<h2- className="text-xl font-medium leading-[1.15] tracking-[-0.01em] text-fd-foreground sm:text-2xl"+ className="text-balance text-xl font-medium leading-[1.15] tracking-[-0.01em] text-fd-foreground sm:text-2xl"id={id}>{title}diff --git a/docs/components/home-resources.tsx b/docs/components/home-resources.tsxindex b8b9450d4..27655e0f8 100644--- a/docs/components/home-resources.tsx+++ b/docs/components/home-resources.tsx@@ -5,10 +5,10 @@ import {Boxes,History,Blocks,+ LayoutDashboard,Wrench,} from 'lucide-react';import type { ReactNode } from 'react';-import { SectionHeading } from './home-features';const RESOURCES = [{@@ -41,6 +41,12 @@ const RESOURCES = [description: 'Browse the 1000+ apps your agent can act on.',href: '/toolkits',},+ {+ icon: <LayoutDashboard aria-hidden="true" className="size-4" />,+ title: 'Platform Dashboard',+ description: 'Auth configs, connected accounts, and logs.',+ href: 'https://dashboard.composio.dev?utm_source=docs&utm_medium=content&utm_campaign=welcome',+ },];/**@@ -51,7 +57,6 @@ const RESOURCES = [export function HomeResources() {return (<section className="not-prose mb-12">- <SectionHeading eyebrow="Keep exploring" title="Reach for the rest." /><div className="grid grid-cols-1 gap-px border border-fd-border bg-fd-border sm:grid-cols-2 lg:grid-cols-3">{RESOURCES.map((resource) => (<ResourceCard key={resource.title} {...resource} />diff --git a/docs/components/home-surfaces.tsx b/docs/components/home-surfaces.tsxindex 1d547dc1d..4cb92acd6 100644--- a/docs/components/home-surfaces.tsx+++ b/docs/components/home-surfaces.tsx@@ -1,23 +1,29 @@import Link from 'next/link';-import { ArrowUpRight, Code2, Plug } from 'lucide-react';-import type { LucideIcon } from 'lucide-react';+import { ArrowUp, ArrowUpRight, Mic, Plus } from 'lucide-react';+import type { ComponentType } from 'react';import { HOME_INTENTS, homeIntentAnchor, type HomeIntent } from '@/lib/home-navigation';-import { SectionHeading } from './home-features';-const INTENT_ICONS: Record<HomeIntent['id'], LucideIcon> = {- build: Code2,- use: Plug,+const BOTTOM_FADE_STYLE = {+ maskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',+ WebkitMaskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',+};++/**+ * Each product is described by the same mock the dashboard onboarding+ * path step uses for it (composio_dashboard `path-step.tsx`): For You is+ * an agent chat composer next to the clients it plugs into, Platform is+ * the SDK in a code window — rebuilt here on docs theme tokens so they+ * hold up in both color schemes.+ */+const INTENT_VISUALS: Record<HomeIntent['id'], ComponentType> = {+ build: PlatformVisual,+ use: ForYouVisual,};export function HomeSurfaces() {return (- <section className="not-prose mb-14">- <SectionHeading- eyebrow="Get started"- id="two-ways-to-start"- title="Two ways to start"- />- <div className="grid grid-cols-1 gap-5 md:grid-cols-2">+ <section className="not-prose mb-20" id="two-ways-to-start">+ <div className="flex flex-col gap-8">{HOME_INTENTS.map(intent => (<IntentCard key={intent.id} intent={intent} />))}@@ -27,28 +33,42 @@ export function HomeSurfaces() {}function IntentCard({ intent }: { intent: HomeIntent }) {- const Icon = INTENT_ICONS[intent.id];+ const Visual = INTENT_VISUALS[intent.id];return (- <article className="flex flex-col border border-fd-border bg-fd-card p-5 shadow-[0_1px_0_rgba(15,15,15,0.04)] sm:p-6">- <AudienceBadge audience={intent.audience} />- <div className="mb-4 flex items-center gap-2 text-[var(--composio-brand)]">- <Icon aria-hidden="true" className="size-4" />- <h3- className="text-[18px] font-medium tracking-[-0.01em] text-fd-foreground"- id={homeIntentAnchor(intent.title)}- >- {intent.title}- </h3>+ <article className="grid overflow-hidden border border-fd-border bg-fd-card shadow-[0_1px_0_rgba(15,15,15,0.04)] md:grid-cols-[minmax(0,1fr)_calc(50%-0.75rem)]">+ <div className="relative overflow-hidden border-b border-fd-border bg-fd-background p-5 pb-40 sm:p-6 sm:pb-44 md:min-h-72 md:border-b-0 md:border-r md:pb-6">+ <div className="relative z-[1] flex flex-col gap-2.5">+ <h3+ className="flex items-center gap-2"+ id={homeIntentAnchor(intent.product)}+ >+ <img+ alt="Composio"+ className="h-[22px] w-auto dark:hidden"+ src="/Composio Logo.svg"+ />+ <img+ alt=""+ aria-hidden="true"+ className="hidden h-[22px] w-auto dark:block"+ src="/Composio Logo Dark.svg"+ />+ <ProductBadge product={intent.product} />+ </h3>+ <p className="max-w-[42ch] text-pretty text-[14px] leading-[1.55] text-fd-foreground/70">+ {intent.description}+ </p>+ </div>+ <div aria-hidden="true" className="pointer-events-none select-none">+ <Visual />+ </div></div>- <p className="mb-5 text-[14px] leading-[1.55] text-fd-foreground/70">- {intent.description}- </p>- <ul className="mt-auto flex flex-col gap-2">+ <ul className="flex flex-col divide-y divide-fd-border">{intent.links.map(link => (- <li key={link.href}>+ <li className="flex flex-1" key={link.href}><Link- className="group flex items-start justify-between gap-4 border border-fd-border bg-fd-background p-3.5 no-underline transition-[border-color,background-color] hover:border-fd-foreground/15 hover:bg-fd-accent/40"+ className="group flex flex-1 items-center justify-between gap-4 px-4 py-5 no-underline transition-colors hover:bg-fd-accent/40 sm:px-5 sm:py-6"href={link.href}><span className="flex min-w-0 flex-col gap-0.5">@@ -61,7 +81,7 @@ function IntentCard({ intent }: { intent: HomeIntent }) {</span><ArrowUpRightaria-hidden="true"- className="mt-0.5 size-3.5 shrink-0 text-fd-foreground/50 transition-transform group-hover:-translate-y-px group-hover:translate-x-px"+ className="size-3.5 shrink-0 text-fd-foreground/50 transition-transform group-hover:-translate-y-px group-hover:translate-x-px"/></Link></li>@@ -74,15 +94,20 @@ function IntentCard({ intent }: { intent: HomeIntent }) {const PLATFORM_BADGE_GRADIENT ='linear-gradient(135deg, #00e68a, #00b4d8, #0077ff)';-function AudienceBadge({ audience }: { audience: HomeIntent['audience'] }) {- const isPlatform = audience === 'Platform';+/**+ * Port of the dashboard's `ComposioProductBadge` (composio_dashboard+ * `composio-product-badge.tsx`) so the docs fork and the dashboard product+ * switcher name the two products with the same mark.+ */+function ProductBadge({ product }: { product: HomeIntent['product'] }) {+ const isPlatform = product === 'Platform';return (<spanclassName={- 'relative mb-4 flex w-fit items-center rounded-[4px] px-[calc(0.25em+2px)] py-[calc(0.167em+2px)] font-mono text-[0.667em] font-semibold uppercase leading-none tracking-wide ' ++ 'relative flex items-center rounded-[5px] px-[9px] py-[7px] font-mono text-[14px] font-semibold uppercase leading-none tracking-wide ' +(isPlatform- ? 'audience-badge-platform'+ ? 'product-badge-platform': 'text-[#0007cd] dark:text-[#4d6fff]')}style={@@ -99,9 +124,9 @@ function AudienceBadge({ audience }: { audience: HomeIntent['audience'] }) {<spanaria-hidden="true"className={- 'pointer-events-none absolute inset-0 rounded-[4px] ' ++ 'pointer-events-none absolute inset-0 rounded-[5px] ' +(isPlatform- ? 'audience-badge-platform-border'+ ? 'product-badge-platform-border': 'border border-[#0007cd] dark:border-[#4d6fff]')}style={@@ -118,7 +143,87 @@ function AudienceBadge({ audience }: { audience: HomeIntent['audience'] }) {: undefined}/>- {audience}+ {product}</span>);}++const FOR_YOU_CLIENT_LOGOS = [+ { src: '/images/clients/claude.svg', label: 'Claude' },+ { src: '/images/clients/codex.png', label: 'Codex' },+ { src: '/images/clients/cursor.svg', label: 'Cursor' },+ { src: '/images/clients/openclaw.svg', label: 'OpenClaw' },+];++function ForYouVisual() {+ return (+ <>+ <div className="absolute inset-x-5 -bottom-3 flex items-end gap-4 sm:inset-x-6">+ <div+ className="grid shrink-0 grid-cols-2 gap-2.5"+ style={BOTTOM_FADE_STYLE}+ >+ {FOR_YOU_CLIENT_LOGOS.map(logo => (+ <img+ alt=""+ className="size-8 object-contain"+ draggable={false}+ key={logo.label}+ src={logo.src}+ />+ ))}+ </div>+ <div+ className="min-w-0 flex-1 rounded-[18px] border border-fd-border bg-fd-card p-3"+ style={BOTTOM_FADE_STYLE}+ >+ <div className="text-[12px] text-fd-foreground/50">+ How can I help?+ </div>+ <div className="mt-4 flex items-center gap-2 text-fd-foreground/50">+ <Plus className="size-3.5 shrink-0" />+ <Mic className="ml-auto size-3.5 shrink-0" />+ <span className="flex size-6 shrink-0 items-center justify-center rounded-[8px] bg-[var(--composio-brand)] text-white">+ <ArrowUp className="size-3.5" />+ </span>+ </div>+ </div>+ </div>+ </>+ );+}++function PlatformVisual() {+ return (+ <div+ className="absolute inset-x-5 -bottom-3 rounded-[12px] border border-fd-border bg-fd-card p-3 font-mono text-[11px] leading-[1.8] text-fd-foreground/75 sm:inset-x-6"+ style={BOTTOM_FADE_STYLE}+ >+ <div className="mb-2 flex items-center gap-1.5">+ <span className="size-2 rounded-full bg-fd-foreground/15" />+ <span className="size-2 rounded-full bg-fd-foreground/15" />+ <span className="size-2 rounded-full bg-fd-foreground/15" />+ </div>+ <div className="truncate">+ <span className="text-[var(--composio-brand)]">import</span>+ {" { Composio } "}+ <span className="text-[var(--composio-brand)]">from</span>+ <span className="text-fd-foreground/55">{" '@composio/core'"}</span>+ </div>+ <div className="truncate">+ <span className="text-[var(--composio-brand)]">const</span>+ {' session = '}+ <span className="text-[var(--composio-brand)]">await</span>+ {' composio.create'}+ <span className="text-fd-foreground/45">(userId)</span>+ </div>+ <div className="truncate">+ <span className="text-[var(--composio-brand)]">const</span>+ {' tools = '}+ <span className="text-[var(--composio-brand)]">await</span>+ {' session.tools'}+ <span className="text-fd-foreground/45">()</span>+ </div>+ </div>+ );+}diff --git a/docs/lib/home-navigation.ts b/docs/lib/home-navigation.tsindex 9ea06ed8f..bbbe58a04 100644--- a/docs/lib/home-navigation.ts+++ b/docs/lib/home-navigation.ts@@ -6,7 +6,7 @@ export interface HomeIntentLink {export interface HomeIntent {id: 'build' | 'use';- audience: 'For you' | 'Platform';+ product: 'Platform' | 'For You';title: string;description: string;links: HomeIntentLink[];@@ -15,9 +15,9 @@ export interface HomeIntent {export const HOME_INTENTS: HomeIntent[] = [{id: 'build',- audience: 'Platform',+ product: 'Platform',title: 'Build with Composio',- description: 'Add Composio tools and authentication to your own agent or application.',+ description: 'Build Composio into your own agent or application — tools, auth, and triggers for every one of your users.',links: [{title: 'Quickstart',@@ -38,9 +38,9 @@ export const HOME_INTENTS: HomeIntent[] = [},{id: 'use',- audience: 'For you',+ product: 'For You',title: 'Use Composio',- description: 'Connect an existing coding agent or terminal to Composio.',+ description: 'Use Composio from the agents you already have — Claude Code, Codex, Cursor, or your terminal.',links: [{title: 'Agent plugins',@@ -71,7 +71,7 @@ export function homeIntentsToMarkdown(): string {.map(link => `- [${link.title}](${link.href}): ${link.description}`).join('\n');- return `### ${intent.title}\n\n**${intent.audience}**\n\n${intent.description}\n\n${links}`;+ return `### ${intent.title}\n\n**${intent.product}**\n\n${intent.description}\n\n${links}`;}).join('\n\n');return `## Two ways to start\n\n${sections}`;diff --git a/docs/tests/static/home-navigation.test.ts b/docs/tests/static/home-navigation.test.tsindex 7f1ee827f..8abe99f70 100644--- a/docs/tests/static/home-navigation.test.ts+++ b/docs/tests/static/home-navigation.test.ts@@ -31,7 +31,7 @@ describe('Welcome navigation', () => {for (const intent of HOME_INTENTS) {expect(markdown).toContain(`### ${intent.title}`);- expect(markdown).toContain(`**${intent.audience}**`);+ expect(markdown).toContain(`**${intent.product}**`);for (const link of intent.links) {expect(markdown).toContain(`[${link.title}](${link.href})`);}@@ -45,21 +45,32 @@ describe('Welcome navigation', () => {expect(markdown).toContain('native Composio plugin for Codex or Claude Code');});- test('keeps rendered headings linkable and badges visible', async () => {+ test('keeps rendered headings linkable and product visuals present', async () => {const source = await Bun.file(new URL('../../components/home-surfaces.tsx', import.meta.url)).text();expect(source).toContain('id="two-ways-to-start"');for (const intent of HOME_INTENTS) {- expect(homeIntentAnchor(intent.title)).toMatch(/^[a-z0-9-]+$/);+ expect(homeIntentAnchor(intent.product)).toMatch(/^[a-z0-9-]+$/);}- expect(source).toContain('id={homeIntentAnchor(intent.title)}');+ expect(source).toContain('id={homeIntentAnchor(intent.product)}');+ // Each card is headed by the canonical product lockup — Composio logo+ // plus the dashboard's ComposioProductBadge port — and leads with the+ // same mock the dashboard onboarding path step uses for that product: an+ // agent chat composer plus client logos for For You, the SDK in a code+ // window for Platform.+ expect(source).toContain('ProductBadge');expect(source).toContain('background: PLATFORM_BADGE_GRADIENT');- expect(source).toContain("backgroundClip: 'text'");- expect(source).toContain("WebkitTextFillColor: 'transparent'");- expect(source).toContain("mask: 'linear-gradient(#fff 0 0) content-box");expect(source).toContain('text-[#0007cd] dark:text-[#4d6fff]');- expect(source).toContain('audience-badge-platform-border');+ expect(source).toContain('product-badge-platform-border');+ expect(source).toContain('/Composio Logo.svg');+ expect(source).toContain('INTENT_VISUALS');+ expect(source).toContain('How can I help?');+ expect(source).toContain('composio.create');+ for (const logo of ['claude.svg', 'codex.png', 'cursor.svg', 'openclaw.svg']) {+ expect(source).toContain(`/images/clients/${logo}`);+ expect(await Bun.file(new URL(`../../public/images/clients/${logo}`, import.meta.url)).exists()).toBe(true);+ }});});