1
import Link from 'next/link';
2
-import { ArrowUpRight, Check } from 'lucide-react';
2
+import { ArrowUpRight } from 'lucide-react';
3
import type { ReactNode } from 'react';
4
+import { AuthDiagram } from './home-auth-diagram';
5
+
6
+const MOCK_FADE_STYLE = {
7
+ maskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',
8
+ WebkitMaskImage: 'linear-gradient(to bottom, black 55%, transparent 100%)',
9
+};
10
11
const LOGO_CDN = 'https://logos.composio.dev/api';
12
+// 10-col × 3-row grid: 29 recognizable toolkit logos plus a brand-tinted
13
+// "+1K" cell in the final slot, ordered as a rough mixed rhythm of comms,
14
+// project management, storage/design, and marketing/sales so no single
15
+// category clusters visually.
16
const TOOLKIT_LOGOS = [
7
- 'gmail', 'slack', 'github', 'linear', 'notion', 'figma', 'stripe', 'hubspot',
8
- 'googledrive', 'airtable', 'jira', 'discord', 'zoom', 'asana', 'salesforce',
9
-];
10
-
11
-const SESSION_APPS: { slug: string; name: string }[] = [
12
- { slug: 'slack', name: 'Slack' },
13
- { slug: 'gmail', name: 'Gmail' },
14
- { slug: 'linear', name: 'Linear' },
17
+ 'gmail', 'slack', 'discord', 'zoom', 'notion',
18
+ 'linear', 'jira', 'asana', 'trello', 'clickup',
19
+ 'github', 'gitlab', 'figma', 'canva', 'googledrive',
20
+ 'dropbox', 'airtable', 'confluence', 'salesforce', 'hubspot',
21
+ 'stripe', 'shopify', 'twilio', 'sendgrid', 'mailchimp',
22
+ 'calendly', 'youtube', 'twitter', 'linkedin',
23
];
24
17
-const TRIGGER_FEED: { app: string; event: string; age: string }[] = [
18
- { app: 'gmail', event: 'message.new', age: '2s' },
19
- { app: 'stripe', event: 'charge.succeeded', age: '8s' },
20
- { app: 'linear', event: 'issue.opened', age: '14s' },
25
+const TRIGGER_FEED: { app: string; event: string }[] = [
26
+ { app: 'gmail', event: 'message.new' },
27
+ { app: 'stripe', event: 'charge.succeeded' },
28
+ { app: 'linear', event: 'issue.opened' },
29
];
30
23
-const WORKBENCH_CODE = `const result = await composio.workbench.run(\`
31
+const SANDBOX_CODE = `const result = await composio.sandbox.run(\`
32
const issues = await tools.LINEAR_LIST_ISSUES();
33
const summary = await ai.summarize(issues);
26
- await tools.SLACK_POST({ channel, text: summary });
34
+ await tools.SLACK_POST({ text: summary });
35
\`);`;
36
29
-/**
30
- * Welcome-page capability grid. Compact card style with proper borders,
31
- * subtle shadow on hover, and a tight single-row visual at the bottom
32
- * of each card so the section reads as four discrete cards rather than
33
- * a flat block.
34
- */
37
export function HomeFeatures() {
38
return (
37
- <section className="not-prose mb-14">
38
- <SectionHeading
39
- eyebrow="What you get"
40
- title="Everything you need to ship production agents."
41
- />
42
- <div className="grid grid-cols-1 gap-5 sm:auto-rows-fr sm:grid-cols-2">
39
+ <section className="not-prose mb-20">
40
+ <SectionHeading title="Everything you need to ship production agents." />
41
+ <div className="grid grid-cols-1 gap-6 sm:auto-rows-fr sm:grid-cols-2">
42
<FeatureCard
43
title="Tools that resolve by intent."
44
description="Smart tool search over 1000+ apps, surfaced just in time with the right scope."
49
title="Auth and context, per end-user."
50
description="OAuth, API keys, and tokens scoped to each user and refreshed automatically."
51
href="/docs/authentication"
53
- visual={<SessionsVisual />}
52
+ visual={<AuthDiagram />}
53
/>
54
<FeatureCard
55
title="Listen to anything, anywhere."
82
return (
83
<Link
84
href={href}
86
- 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)]"
85
+ 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"
86
>
87
<ArrowUpRight
88
aria-hidden="true"
90
- 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"
89
+ 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"
90
/>
92
-
93
- <div className="flex flex-col gap-1 pr-5">
94
- <h3 className="text-[18px] font-medium leading-snug tracking-[-0.01em] text-fd-foreground">
91
+ <div className="flex flex-col gap-1.5 pr-6">
92
+ <h3 className="text-balance text-[18px] font-medium leading-snug tracking-[-0.01em] text-fd-foreground">
93
{title}
94
</h3>
97
- <p className="text-[13px] leading-[1.5] text-fd-foreground/65">
95
+ <p className="max-w-[42ch] text-pretty text-[14px] leading-[1.55] text-fd-foreground/70">
96
{description}
97
</p>
98
</div>
101
-
102
- <div className="mt-1">{visual}</div>
99
+ <div
100
+ aria-hidden="true"
101
+ className="pointer-events-none mt-6 h-40 select-none"
102
+ style={MOCK_FADE_STYLE}
103
+ >
104
+ {visual}
105
+ </div>
106
</Link>
107
);
108
}
109
110
function ToolkitsVisual() {
108
- // 8×2 grid: 15 recognizable toolkit logos + a brand-tinted "+1K" cell
109
- // in the last slot. Smaller square tiles than before so the grid stays
110
- // in the same vertical footprint while showing roughly 1.7× more logos.
111
+ // 8×2 tile grid stretched to fill the visual pane. Tiles paint their own
112
+ // bg-fd-card so they read as elevated on the recessed pane; the container's
113
+ // bg-fd-border bleeds through the 1px gaps to draw hairlines between them.
114
return (
112
- <div className="grid grid-cols-8 gap-px overflow-hidden rounded-sm border border-fd-border bg-fd-border">
115
+ <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">
116
{TOOLKIT_LOGOS.map((slug) => (
117
<div
118
key={slug}
116
- className="flex aspect-square items-center justify-center bg-fd-background"
119
+ className="flex items-center justify-center bg-fd-card"
120
>
121
<img
122
alt=""
127
/>
128
</div>
129
))}
127
- <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)]">
130
+ <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)]">
131
+1K
132
</div>
133
</div>
134
);
135
}
136
134
-function SessionsVisual() {
135
- return (
136
- <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-background font-mono text-[11px]">
137
- <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-fd-foreground/45">
138
- <span className="uppercase tracking-[0.04em]">user_id</span>
139
- <span className="text-fd-foreground/75">usr_9x2kLm7</span>
140
- </div>
141
- <ul className="flex flex-col">
142
- {SESSION_APPS.map((app, i) => (
143
- <li
144
- key={app.slug}
145
- className={
146
- 'flex items-center justify-between px-2.5 py-1.5' +
147
- (i < SESSION_APPS.length - 1
148
- ? ' border-b border-fd-border'
149
- : '')
150
- }
151
- >
152
- <span className="inline-flex items-center gap-2 text-fd-foreground/75">
153
- <img
154
- alt=""
155
- aria-hidden="true"
156
- className="size-3.5 object-contain"
157
- draggable={false}
158
- src={`${LOGO_CDN}/${app.slug}`}
159
- />
160
- {app.name}
161
- </span>
162
- <span className="inline-flex items-center gap-1 text-[var(--composio-brand)]">
163
- <Check aria-hidden="true" className="size-3" />
164
- <span className="uppercase tracking-[0.04em]">connected</span>
165
- </span>
166
- </li>
167
- ))}
168
- </ul>
169
- </div>
170
- );
171
-}
172
-
137
function TriggersVisual() {
138
return (
175
- <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-background font-mono text-[11px]">
176
- <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-fd-foreground/45">
177
- <span className="inline-flex items-center gap-1.5">
178
- <span className="relative inline-flex">
179
- <span className="size-1.5 rounded-full bg-[var(--composio-brand)]" />
180
- <span className="absolute inset-0 animate-ping rounded-full bg-[var(--composio-brand)] opacity-60" />
139
+ <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]">
140
+ {TRIGGER_FEED.map((row, i) => (
141
+ <li
142
+ key={`${row.app}-${row.event}`}
143
+ className={
144
+ 'flex flex-1 items-center gap-3 px-4' +
145
+ (i < TRIGGER_FEED.length - 1 ? ' border-b border-fd-border' : '')
146
+ }
147
+ >
148
+ <img
149
+ alt=""
150
+ aria-hidden="true"
151
+ className="size-4 object-contain"
152
+ draggable={false}
153
+ src={`${LOGO_CDN}/${row.app}`}
154
+ />
155
+ <span className="truncate">
156
+ <span className="text-fd-foreground/45">{row.app}.</span>
157
+ <span className="text-fd-foreground/80">{row.event}</span>
158
</span>
182
- <span className="uppercase tracking-[0.04em]">live</span>
183
- </span>
184
- <span className="uppercase tracking-[0.04em]">trigger feed</span>
185
- </div>
186
- <ul className="flex flex-col">
187
- {TRIGGER_FEED.map((row, i) => (
188
- <li
189
- key={`${row.app}-${row.event}`}
190
- className={
191
- 'flex items-center gap-2 px-2.5 py-1.5 text-fd-foreground/75' +
192
- (i < TRIGGER_FEED.length - 1
193
- ? ' border-b border-fd-border'
194
- : '')
195
- }
196
- >
197
- <img
198
- alt=""
199
- aria-hidden="true"
200
- className="size-3.5 object-contain"
201
- draggable={false}
202
- src={`${LOGO_CDN}/${row.app}`}
203
- />
204
- <span className="truncate">
205
- <span className="text-fd-foreground/45">{row.app}.</span>
206
- <span>{row.event}</span>
207
- </span>
208
- <span className="ml-auto shrink-0 text-fd-foreground/35">
209
- {row.age}
210
- </span>
211
- </li>
212
- ))}
213
- </ul>
214
- </div>
159
+ </li>
160
+ ))}
161
+ </ul>
162
);
163
}
164
165
function WorkbenchVisual() {
219
- // Mirrors the active workbench tile in the hero animation: outer
220
- // composio_workbench panel with python 3.11 status, then an active
221
- // instance card with CPU lights, task label, brand-blue "DONE" badge,
222
- // and a fade-masked code preview.
166
return (
224
- <div className="overflow-hidden rounded-sm border border-fd-border bg-fd-card font-mono">
225
- <div className="flex items-center justify-between border-b border-fd-border px-2.5 py-1 text-[10px]">
226
- <span className="uppercase tracking-[0.04em] text-fd-foreground/40">
227
- composio_workbench
228
- </span>
229
- <span className="inline-flex items-center gap-1 text-fd-foreground/40">
230
- <span className="relative inline-flex">
231
- <span className="size-1.5 rounded-full bg-[var(--composio-brand)]" />
232
- <span className="absolute inset-0 animate-ping rounded-full bg-[var(--composio-brand)] opacity-60" />
233
- </span>
234
- python 3.11
167
+ <div className="flex h-full w-full flex-col overflow-hidden rounded-[8px] border border-fd-border bg-fd-card">
168
+ <div className="flex shrink-0 items-center gap-2 border-b border-fd-border px-3.5 py-2">
169
+ <span className="size-1.5 rounded-full bg-fd-foreground/25" />
170
+ <span className="font-mono text-[10.5px] tracking-[0.02em] text-fd-foreground/50">
171
+ sandbox.ts
172
</span>
173
</div>
237
- <div className="bg-fd-muted">
238
- <div className="flex items-center justify-between gap-2 border-b border-fd-border px-2.5 py-1">
239
- <div className="flex min-w-0 items-center gap-2">
240
- <StaticCpuLights />
241
- <span className="truncate text-[9px] uppercase tracking-wider text-fd-foreground/50">
242
- Run summarization
243
- </span>
244
- </div>
245
- <span className="shrink-0 text-[9px] uppercase tracking-wider text-[var(--composio-brand)]">
246
- done
247
- </span>
248
- </div>
249
- <div
250
- className="relative overflow-hidden px-2.5 py-1.5"
251
- style={{
252
- maskImage:
253
- 'linear-gradient(to bottom, black 0%, black 70%, transparent 100%)',
254
- WebkitMaskImage:
255
- 'linear-gradient(to bottom, black 0%, black 70%, transparent 100%)',
256
- }}
257
- >
258
- <pre className="overflow-hidden text-[10px] leading-[1.6] text-fd-foreground/70">
259
- {WORKBENCH_CODE}
260
- </pre>
261
- </div>
262
- </div>
263
- </div>
264
- );
265
-}
266
-
267
-function StaticCpuLights() {
268
- // 4×2 grid of brand-blue cells; each cell runs the `hero-cpu-pulse`
269
- // keyframe with a staggered delay so they ripple out of phase, mimicking
270
- // the noise-driven CpuLights in the demo zone — but cheap CSS-only.
271
- const cells = Array.from({ length: 8 });
272
- return (
273
- <div
274
- className="grid shrink-0 gap-[1px]"
275
- style={{
276
- gridTemplateColumns: 'repeat(4, 4px)',
277
- gridTemplateRows: 'repeat(2, 4px)',
278
- }}
279
- >
280
- {cells.map((_, i) => {
281
- const col = i % 4;
282
- const row = Math.floor(i / 4);
283
- // Diagonal-ish stagger so cells light up in a wave.
284
- const delay = (col * 120 + row * 60) % 720;
285
- return (
286
- <span
287
- key={i}
288
- className="bg-[var(--composio-brand)]"
289
- style={{
290
- animation: `hero-cpu-pulse 1.4s ease-in-out ${delay}ms infinite`,
291
- }}
292
- />
293
- );
294
- })}
174
+ <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">
175
+ {SANDBOX_CODE}
176
+ </pre>
177
</div>
178
);
179
}
183
id,
184
title,
185
}: {
304
- eyebrow: string;
186
+ eyebrow?: string;
187
id?: string;
188
title: string;
189
}) {
190
return (
191
<div className="mb-5 flex flex-col gap-1.5">
310
- <span className="font-mono text-[10.5px] uppercase tracking-[0.08em] text-fd-foreground/55">
311
- {eyebrow}
312
- </span>
192
+ {eyebrow && (
193
+ <span className="font-mono text-[10.5px] uppercase tracking-[0.08em] text-fd-foreground/55">
194
+ {eyebrow}
195
+ </span>
196
+ )}
197
<h2
314
- className="text-xl font-medium leading-[1.15] tracking-[-0.01em] text-fd-foreground sm:text-2xl"
198
+ className="text-balance text-xl font-medium leading-[1.15] tracking-[-0.01em] text-fd-foreground sm:text-2xl"
199
id={id}
200
>
201
{title}