Skip to content

The Open Standard for Generative UI

docs: turn the Examples tab into Integrations and move projects to Demos (#1337)

abhithesys27a9ce1871cf
diff --git a/docs/app/examples/layout.tsx b/docs/app/examples/layout.tsx
deleted file mode 100644
index a18e31aa9..000000000
--- a/docs/app/examples/layout.tsx
+++ /dev/null
@@ -1,5 +0,0 @@
-import { DocsShell } from "@/components/docs-shell";
-
-export default function Layout({ children }: LayoutProps<"/examples">) {
- return <DocsShell>{children}</DocsShell>;
-}
diff --git a/docs/app/examples/page.tsx b/docs/app/examples/page.tsx
deleted file mode 100644
index bdb6a70a8..000000000
--- a/docs/app/examples/page.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import { DocsPageView, getDocsPageMetadata } from "@/components/docs-page";
-import { source } from "@/lib/source";
-import { notFound } from "next/navigation";
-
-const page = source.getPage(["examples"]);
-
-export default function Page() {
- if (!page) notFound();
-
- return <DocsPageView page={page} />;
-}
-
-export const metadata = page ? getDocsPageMetadata(page) : {};
diff --git a/docs/app/global.css b/docs/app/global.css
index 8e09f17b2..825ff8ba1 100644
--- a/docs/app/global.css
+++ b/docs/app/global.css
@@ -42,13 +42,21 @@ body {
background: var(--openui-foreground);
}
+/* Smooth scroll for in-page anchors such as TOC links. */
+@media (prefers-reduced-motion: no-preference) {
+ html {
+ scroll-behavior: smooth;
+ }
+}
+
/* Override Fumadocs `max-w-[900px]` on `<article id="nd-page">` */
#nd-page {
max-width: 800px !important;
}
#nd-page[data-full="true"],
-#nd-page[data-full=""] {
+#nd-page[data-full=""],
+#nd-page[data-no-sidebar] {
max-width: 1168px !important;
}
@@ -82,6 +90,10 @@ body {
/* Pages with no docs sidebar tree (no placeholder) — keep layout vars consistent */
#nd-docs-layout:not(:has([data-sidebar-placeholder])) {
--fd-sidebar-width: 0px !important;
+}
+
+/* A sidebar-less page can still have a TOC (Integrations); only drop its column when there is none. */
+#nd-docs-layout:not(:has([data-sidebar-placeholder])):not(:has(#nd-toc)) {
--fd-toc-width: 0px !important;
}
diff --git a/docs/app/layout.tsx b/docs/app/layout.tsx
index 7f6edebeb..256b99f62 100644
--- a/docs/app/layout.tsx
+++ b/docs/app/layout.tsx
@@ -85,7 +85,13 @@ export const metadata: Metadata = {
export default function Layout({ children }: LayoutProps<"/">) {
return (
- <html lang="en" className={`${inter.className} ${geistMono.variable}`} suppressHydrationWarning>
+ <html
+ lang="en"
+ className={`${inter.className} ${geistMono.variable}`}
+ // Lets Next.js skip smooth scrolling on route changes; in-page anchors still scroll smoothly.
+ data-scroll-behavior="smooth"
+ suppressHydrationWarning
+ >
<body className="flex flex-col min-h-screen">
<PHProvider>
<RootProvider theme={{ defaultTheme: "system", enableSystem: true }}>
diff --git a/docs/components/docs-navbar.tsx b/docs/components/docs-navbar.tsx
index 2e113443e..ba4344724 100644
--- a/docs/components/docs-navbar.tsx
+++ b/docs/components/docs-navbar.tsx
@@ -4,7 +4,7 @@ import {
API_REFERENCE_URL,
COOKBOOKS_URL,
DEMOS_URL,
- EXAMPLES_URL,
+ INTEGRATIONS_URL,
isPathWithin,
} from "@/lib/docs-navigation";
import { siteConfig } from "@/lib/layout.shared";
@@ -22,7 +22,7 @@ import { ThemeToggle } from "./theme-toggle";
const tabs = [
{ title: "Docs", url: "/docs" },
{ title: "Cookbooks", url: COOKBOOKS_URL },
- { title: "Examples", url: EXAMPLES_URL },
+ { title: "Integrations", url: INTEGRATIONS_URL },
{ title: "Demos", url: DEMOS_URL },
{ title: "API Reference", url: API_REFERENCE_URL },
];
diff --git a/docs/components/docs-page.tsx b/docs/components/docs-page.tsx
index 2342bd6a3..c71b85737 100644
--- a/docs/components/docs-page.tsx
+++ b/docs/components/docs-page.tsx
@@ -13,18 +13,28 @@ export function DocsPageView({ page }: { page: DocsSourcePage }) {
const MDX = page.data.body;
return (
- <DocsPage toc={page.data.toc} full={page.data.full} footer={{ enabled: !page.data.hideFooter }}>
+ <DocsPage
+ toc={page.data.toc}
+ full={page.data.full}
+ footer={{ enabled: !page.data.hideFooter }}
+ tableOfContent={{ style: "clerk" }}
+ tableOfContentPopover={{ style: "clerk" }}
+ // Without a sidebar there is room for the `full` page width next to the TOC (see global.css).
+ data-no-sidebar={!page.data.sidebar || undefined}
+ >
{!page.data.customHeader && (
<>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription className="mb-0">{page.data.description}</DocsDescription>
- <div className="flex flex-row gap-2 items-center border-b pb-6">
- <LLMCopyButton markdownUrl={`${page.url}.mdx`} />
- <ViewOptions
- markdownUrl={page.url}
- githubUrl={`https://github.com/${gitConfig.user}/${gitConfig.repo}/blob/${gitConfig.branch}/docs/content/docs/${page.path}`}
- />
- </div>
+ {page.data.pageActions && (
+ <div className="flex flex-row gap-2 items-center border-b pb-6">
+ <LLMCopyButton markdownUrl={`${page.url}.mdx`} />
+ <ViewOptions
+ markdownUrl={page.url}
+ githubUrl={`https://github.com/${gitConfig.user}/${gitConfig.repo}/blob/${gitConfig.branch}/docs/content/docs/${page.path}`}
+ />
+ </div>
+ )}
</>
)}
<DocsBody>
diff --git a/docs/components/docs-route-layout.tsx b/docs/components/docs-route-layout.tsx
index 4aa5d7639..0c3c095a0 100644
--- a/docs/components/docs-route-layout.tsx
+++ b/docs/components/docs-route-layout.tsx
@@ -111,10 +111,12 @@ function NestedSidebarHeader({ root }: { root: NestedDocsRoot }) {
type DocsRouteLayoutProps = {
tree: React.ComponentProps<typeof DocsLayout>["tree"];
+ /** URLs of pages with `sidebar: false` in their frontmatter. */
+ noSidebarUrls: string[];
children: ReactNode;
};
-export function DocsRouteLayout({ tree, children }: DocsRouteLayoutProps) {
+export function DocsRouteLayout({ tree, noSidebarUrls, children }: DocsRouteLayoutProps) {
const pathname = usePathname();
const [sidebarOverride, setSidebarOverride] = useState<SidebarModeOverride>();
const sidebarMode = getSidebarModeForPathname(pathname, sidebarOverride);
@@ -131,8 +133,7 @@ export function DocsRouteLayout({ tree, children }: DocsRouteLayoutProps) {
const navigationContext = useMemo(() => ({ enterNested, showGlobal }), [enterNested, showGlobal]);
const nestedRoot = sidebarMode.kind === "nested" ? sidebarMode.root : undefined;
- // Demos is a single page of cards, so it has no sidebar.
- const hasSidebar = sidebarMode.kind !== "demos";
+ const hasSidebar = !noSidebarUrls.includes(pathname);
const tabFolder =
sidebarMode.kind === "global" || sidebarMode.kind === "nested" ? undefined : sidebarMode.kind;
const activeTree = useMemo(() => {
diff --git a/docs/components/docs-shell.tsx b/docs/components/docs-shell.tsx
index d5b508533..48cb6e7dc 100644
--- a/docs/components/docs-shell.tsx
+++ b/docs/components/docs-shell.tsx
@@ -4,12 +4,20 @@ import { WebsiteThemeProvider } from "@/components/website-theme-provider";
import { source } from "@/lib/source";
import type { ReactNode } from "react";
+/** Pages with `sidebar: false` in their frontmatter. */
+const NO_SIDEBAR_URLS = source
+ .getPages()
+ .filter((page) => !page.data.sidebar)
+ .map((page) => page.url);
+
/** The docs chrome (navbar tabs and sidebar) shared by `/docs` and the top-level sections. */
export function DocsShell({ children }: { children: ReactNode }) {
return (
<WebsiteThemeProvider>
<C1DocsDialog />
- <DocsRouteLayout tree={source.getPageTree()}>{children}</DocsRouteLayout>
+ <DocsRouteLayout tree={source.getPageTree()} noSidebarUrls={NO_SIDEBAR_URLS}>
+ {children}
+ </DocsRouteLayout>
</WebsiteThemeProvider>
);
}
diff --git a/docs/components/showcase/demos.tsx b/docs/components/showcase/demos.tsx
index eb6c2796c..4e7f7a3a7 100644
--- a/docs/components/showcase/demos.tsx
+++ b/docs/components/showcase/demos.tsx
@@ -1,4 +1,6 @@
-import { ShowcaseGrid, type ShowcaseItem } from "./cards";
+import { EXAMPLES_REPO_URL } from "@/lib/examples-catalog";
+import { labProjects } from "@/lib/lab-projects";
+import { LinkCardGrid, ShowcaseGrid, type ShowcaseItem } from "./cards";
const DEMOS: ShowcaseItem[] = [
{
@@ -38,3 +40,49 @@ const DEMOS: ShowcaseItem[] = [
export function Demos() {
return <ShowcaseGrid items={DEMOS} />;
}
+
+const FEATURED_PROJECTS: ShowcaseItem[] = [
+ {
+ name: "OpenClaw OS",
+ tagline: "Agent workspace",
+ description:
+ "The default workspace for OpenClaw. Agents generate interactive apps and artifacts that stay updated with live data.",
+ image: { light: "/nav/openclaw-light.webp", dark: "/nav/openclaw-dark.webp" },
+ links: [
+ { label: "Website", href: "/openclaw-os" },
+ { label: "GitHub", href: "https://github.com/thesysdev/openclaw-os", external: true },
+ ],
+ },
+ {
+ name: "AppLess",
+ tagline: "Phone OS concept",
+ description:
+ "An experimental phone with no apps. Ask for what you need and OpenUI streams a native interface for it on iOS and Android.",
+ image: { light: "/nav/appless-light.webp", dark: "/nav/appless-dark.webp" },
+ links: [{ label: "GitHub", href: "https://github.com/thesysdev/appless", external: true }],
+ },
+];
+
+export function FeaturedProjects() {
+ return <ShowcaseGrid items={FEATURED_PROJECTS} />;
+}
+
+export function CommunityProjects() {
+ // Community work that was merged into `examples/` already has a card on the Integrations page.
+ const projects = labProjects.filter(
+ (project) =>
+ project.status === "Community" &&
+ !project.links.some((link) => link.href.startsWith(EXAMPLES_REPO_URL)),
+ );
+
+ return (
+ <LinkCardGrid
+ items={projects.map((project) => ({
+ name: project.name,
+ description: project.description,
+ tag: project.type,
+ links: project.links.map((link) => ({ ...link, external: true })),
+ }))}
+ />
+ );
+}
diff --git a/docs/components/showcase/examples.tsx b/docs/components/showcase/examples.tsx
index a6e19b7f7..f77cd85cc 100644
--- a/docs/components/showcase/examples.tsx
+++ b/docs/components/showcase/examples.tsx
@@ -1,92 +1,50 @@
-import { EXAMPLE_CATEGORIES } from "@/lib/example-categories";
-import { EXAMPLES_REPO_URL, getExamplesInCategory } from "@/lib/examples-catalog";
-import { labProjects } from "@/lib/lab-projects";
+import { EXAMPLE_CATEGORIES, type ExampleCategoryId } from "@/lib/example-categories";
+import { getExamplesInCategory } from "@/lib/examples-catalog";
import { BookOpen } from "lucide-react";
import Link from "next/link";
-import { CardLink, LinkCardGrid, ShowcaseGrid, type ShowcaseItem } from "./cards";
+import { CardLink } from "./cards";
import { RunLocally } from "./run-locally";
import styles from "./showcase.module.css";
-const FEATURED_PROJECTS: ShowcaseItem[] = [
- {
- name: "OpenClaw OS",
- tagline: "Agent workspace",
- description:
- "The default workspace for OpenClaw. Agents generate interactive apps and artifacts that stay updated with live data.",
- image: { light: "/nav/openclaw-light.webp", dark: "/nav/openclaw-dark.webp" },
- links: [
- { label: "Website", href: "/openclaw-os" },
- { label: "GitHub", href: "https://github.com/thesysdev/openclaw-os", external: true },
- ],
- },
- {
- name: "AppLess",
- tagline: "Phone OS concept",
- description:
- "An experimental phone with no apps. Ask for what you need and OpenUI streams a native interface for it on iOS and Android.",
- image: { light: "/nav/appless-light.webp", dark: "/nav/appless-dark.webp" },
- links: [{ label: "GitHub", href: "https://github.com/thesysdev/appless", external: true }],
- },
-];
-
-export function FeaturedProjects() {
- return <ShowcaseGrid items={FEATURED_PROJECTS} />;
-}
-
-export function RepoExamples() {
- return (
- <div className={styles.categories}>
- {EXAMPLE_CATEGORIES.map((category) => {
- const examples = getExamplesInCategory(category.id);
- if (examples.length === 0) return null;
-
- return (
- <section key={category.id} aria-labelledby={category.id}>
- <h3 id={category.id} className={styles.categoryTitle}>
- {category.title}
- </h3>
- <p className={styles.categoryDescription}>{category.description}</p>
- <div className={styles.grid}>
- {examples.map((example) => (
- <article key={example.name} className={styles.card}>
- <h4 className={styles.cardTitle}>{example.title}</h4>
- <p className={styles.cardDescription}>{example.description}</p>
- <div className={styles.cardLinks}>
- <RunLocally title={example.title} name={example.name} env={example.env} />
- <CardLink label="Source" href={example.sourceUrl} external />
- {example.guideUrl ? (
- <Link className={styles.cardLink} href={example.guideUrl}>
- <BookOpen aria-hidden className={styles.cardLinkIcon} />
- Guide
- </Link>
- ) : null}
- </div>
- </article>
- ))}
- </div>
- </section>
- );
- })}
- </div>
- );
-}
-
-export function CommunityProjects() {
- // Community work that was merged into `examples/` already has a card above.
- const projects = labProjects.filter(
- (project) =>
- project.status === "Community" &&
- !project.links.some((link) => link.href.startsWith(EXAMPLES_REPO_URL)),
+/** One section of the Integrations page. Its `##` heading lives in the MDX, so it shows in the TOC. */
+export function ExampleCategory({ id }: { id: ExampleCategoryId }) {
+ const category = EXAMPLE_CATEGORIES.find((c) => c.id === id);
+ // Longest description first, so cards sharing a row have similar heights.
+ const examples = getExamplesInCategory(id).sort(
+ (a, b) => b.description.length - a.description.length,
);
+ if (!category || examples.length === 0) return null;
return (
- <LinkCardGrid
- items={projects.map((project) => ({
- name: project.name,
- description: project.description,
- tag: project.type,
- links: project.links.map((link) => ({ ...link, external: true })),
- }))}
- />
+ <>
+ <p className={styles.categoryDescription}>{category.description}</p>
+ <div className={styles.grid}>
+ {examples.map((example) => (
+ <article key={example.name} className={`${styles.card} ${styles.exampleCard}`}>
+ <div className={styles.cardIdentity}>
+ {/* Brand marks keep their intrinsic aspect ratio, as on the integrations page. */}
+ {/* eslint-disable-next-line @next/next/no-img-element */}
+ <img
+ alt=""
+ src={example.logo}
+ className={example.logoIsDark ? styles.cardLogoDark : styles.cardLogo}
+ />
+ <h4 className={styles.cardTitle}>{example.title}</h4>
+ </div>
+ <p className={styles.cardDescription}>{example.description}</p>
+ <div className={styles.cardLinks}>
+ <RunLocally title={example.title} name={example.name} env={example.env} />
+ <CardLink label="Source" href={example.sourceUrl} external />
+ {example.guideUrl ? (
+ <Link className={styles.cardLink} href={example.guideUrl}>
+ <BookOpen aria-hidden className={styles.cardLinkIcon} />
+ Guide
+ </Link>
+ ) : null}
+ </div>
+ </article>
+ ))}
+ </div>
+ </>
);
}
diff --git a/docs/components/showcase/showcase.module.css b/docs/components/showcase/showcase.module.css
index e1bc4fa10..a35408146 100644
--- a/docs/components/showcase/showcase.module.css
+++ b/docs/components/showcase/showcase.module.css
@@ -103,6 +103,39 @@
font-size: 1.125rem !important;
}
+.cardIdentity {
+ display: flex;
+ align-items: center;
+ gap: 0.5rem;
+}
+
+.cardLogo,
+.cardLogoDark {
+ width: 1.25rem;
+ height: 1.25rem;
+ flex-shrink: 0;
+ margin: 0 !important;
+ object-fit: contain;
+}
+
+:global(.dark) .cardLogoDark {
+ filter: invert(1);
+}
+
+/* Integration cards share the grid's rows through subgrid, so the logo row, description, and
+ links line up across every card in a row. */
+.exampleCard {
+ display: grid;
+ grid-row: span 3;
+ grid-template-rows: subgrid;
+ row-gap: 0.75rem;
+}
+
+.exampleCard .cardDescription,
+.exampleCard .cardLinks {
+ margin-top: 0 !important;
+}
+
.cardDescription {
flex: 1;
margin: 0.375rem 0 0 !important;
@@ -227,18 +260,6 @@
color: var(--docs-text-muted);
}
-.categories {
- display: flex;
- flex-direction: column;
- gap: 2.25rem;
- margin-top: 1.5rem;
-}
-
-.categoryTitle {
- margin: 0 !important;
- scroll-margin-top: 7rem;
-}
-
.categoryDescription {
margin: 0.25rem 0 0 !important;
color: var(--docs-text-secondary);
diff --git a/docs/content/docs/demos/index.mdx b/docs/content/docs/demos/index.mdx
index e46cb5d50..95e7566fd 100644
--- a/docs/content/docs/demos/index.mdx
+++ b/docs/content/docs/demos/index.mdx
@@ -1,9 +1,25 @@
---
title: Demos
-description: Live demos of OpenUI you can try in the browser.
+description: Live demos of OpenUI, projects the team builds in the open, and work from the community.
full: true
+sidebar: false
+pageActions: false
---
-import { Demos } from "@/components/showcase/demos";
+import { CommunityProjects, Demos, FeaturedProjects } from "@/components/showcase/demos";
+
+## Live demos
<Demos />
+
+## Featured projects
+
+Full products the OpenUI team builds in the open to show what generative UI can do beyond chat.
+
+<FeaturedProjects />
+
+## Community projects
+
+Apps, tools, and integrations built by the OpenUI community. To add yours, [open an issue](https://github.com/thesysdev/openui/issues) with a link and a short description.
+
+<CommunityProjects />
diff --git a/docs/content/docs/examples/index.mdx b/docs/content/docs/examples/index.mdx
deleted file mode 100644
index 4f2d81fd9..000000000
--- a/docs/content/docs/examples/index.mdx
+++ /dev/null
@@ -1,29 +0,0 @@
----
-title: Examples
-description: Projects built with OpenUI, runnable examples from the repository, and work from the community.
-full: true
----
-
-import { CommunityProjects, FeaturedProjects, RepoExamples } from "@/components/showcase/examples";
-
-## Featured projects
-
-Full products the OpenUI team builds in the open to show what generative UI can do beyond chat.
-
-<FeaturedProjects />
-
-## Runnable examples
-
-Every example in the [`examples/`](https://github.com/thesysdev/openui/tree/main/examples) folder is a standalone app. Scaffold any of them with the OpenUI CLI. **Run locally** on a card shows the exact command and the API key that example needs:
-
-```bash
-npx @openuidev/cli@latest create --example <name>
-```
-
-<RepoExamples />
-
-## Community projects
-
-Apps, tools, and integrations built by the OpenUI community. To add yours, [open an issue](https://github.com/thesysdev/openui/issues) with a link and a short description.
-
-<CommunityProjects />
diff --git a/docs/content/docs/examples/meta.json b/docs/content/docs/examples/meta.json
deleted file mode 100644
index f8a2c6589..000000000
--- a/docs/content/docs/examples/meta.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "title": "Examples",
- "root": true,
- "pages": [
- "[Featured projects](/examples#featured-projects)",
- "---Runnable examples---",
- "[Agent frameworks](/examples#agent-frameworks)",
- "[App frameworks](/examples#app-frameworks)",
- "[Design systems](/examples#design-systems)",
- "[Harnesses](/examples#harnesses)",
- "[Miscellaneous](/examples#miscellaneous)",
- "---Community---",
- "[Community projects](/examples#community-projects)"
- ]
-}
diff --git a/docs/content/docs/integrations/index.mdx b/docs/content/docs/integrations/index.mdx
new file mode 100644
index 000000000..c5eb5445d
--- /dev/null
+++ b/docs/content/docs/integrations/index.mdx
@@ -0,0 +1,28 @@
+---
+title: Integrations
+description: Example apps that connect OpenUI to agent frameworks, app frameworks, design systems, and harnesses.
+sidebar: false
+pageActions: false
+---
+
+import { ExampleCategory } from "@/components/showcase/examples";
+
+## Agent frameworks
+
+<ExampleCategory id="agent-frameworks" />
+
+## App frameworks
+
+<ExampleCategory id="app-frameworks" />
+
+## Design systems
+
+<ExampleCategory id="design-systems" />
+
+## Harnesses
+
+<ExampleCategory id="harnesses" />
+
+## Miscellaneous
+
+<ExampleCategory id="miscellaneous" />
diff --git a/docs/content/docs/integrations/meta.json b/docs/content/docs/integrations/meta.json
new file mode 100644
index 000000000..78783498e
--- /dev/null
+++ b/docs/content/docs/integrations/meta.json
@@ -0,0 +1,5 @@
+{
+ "title": "Integrations",
+ "root": true,
+ "pages": ["index"]
+}
diff --git a/docs/content/docs/meta.json b/docs/content/docs/meta.json
index c691f2a61..d0b5f87f0 100644
--- a/docs/content/docs/meta.json
+++ b/docs/content/docs/meta.json
@@ -7,7 +7,7 @@
"build-agents",
"agent",
"cookbooks",
- "examples",
+ "integrations",
"demos",
"production",
"gateway",
diff --git a/docs/lib/docs-navigation.test.ts b/docs/lib/docs-navigation.test.ts
index 6f6b56a69..a63ae5b4c 100644
--- a/docs/lib/docs-navigation.test.ts
+++ b/docs/lib/docs-navigation.test.ts
@@ -193,13 +193,16 @@ describe("nested docs navigation", () => {
},
{
type: "folder",
- name: "Examples",
+ name: "Integrations",
root: true,
- $ref: { folder: "examples" },
+ $ref: { folder: "integrations" },
children: [
- { type: "page", name: "Featured projects", url: "/examples#featured-projects" },
- { type: "separator", name: "Community" },
- { type: "page", name: "Community projects", url: "/examples#community-projects" },
+ {
+ type: "page",
+ name: "Agent frameworks",
+ url: "/docs/integrations#agent-frameworks",
+ },
+ { type: "page", name: "Harnesses", url: "/docs/integrations#harnesses" },
],
},
{
@@ -261,11 +264,11 @@ describe("nested docs navigation", () => {
],
};
- it("gives the Cookbooks, Examples, Demos, and API Reference tabs their own sidebars", () => {
+ it("gives the Cookbooks, Integrations, Demos, and API Reference tabs their own sidebars", () => {
const tabs = [
["/cookbooks", "cookbooks"],
["/cookbooks/conversational-analytics", "cookbooks"],
- ["/examples", "examples"],
+ ["/docs/integrations", "integrations"],
["/demos", "demos"],
["/docs/api-reference", "api-reference"],
] as const;
@@ -294,14 +297,17 @@ describe("nested docs navigation", () => {
},
],
});
- assert.deepEqual(getTabTree(fullTree, "examples"), {
+ assert.deepEqual(getTabTree(fullTree, "integrations"), {
type: "root",
- $id: "docs:examples",
- name: "Examples",
+ $id: "docs:integrations",
+ name: "Integrations",
children: [
- { type: "page", name: "Featured projects", url: "/examples#featured-projects" },
- { type: "separator", name: "Community" },
- { type: "page", name: "Community projects", url: "/examples#community-projects" },
+ {
+ type: "page",
+ name: "Agent frameworks",
+ url: "/docs/integrations#agent-frameworks",
+ },
+ { type: "page", name: "Harnesses", url: "/docs/integrations#harnesses" },
],
});
assert.deepEqual(getTabTree(fullTree, "api-reference"), {
diff --git a/docs/lib/docs-navigation.ts b/docs/lib/docs-navigation.ts
index 399ef3370..45e303456 100644
--- a/docs/lib/docs-navigation.ts
+++ b/docs/lib/docs-navigation.ts
@@ -1,6 +1,6 @@
import type * as PageTree from "fumadocs-core/page-tree";
-export type TabFolder = "cookbooks" | "examples" | "demos" | "api-reference";
+export type TabFolder = "cookbooks" | "integrations" | "demos" | "api-reference";
export type NestedDocsRoot =
"openui-lang" | "build-agents" | "agent-interface" | "gateway" | "reliability";
@@ -63,7 +63,7 @@ export const NESTED_DOCS_SECTIONS: Record<NestedDocsRoot, NestedSection> = {
export const API_REFERENCE_URL = "/docs/api-reference";
export const COOKBOOKS_URL = "/cookbooks";
-export const EXAMPLES_URL = "/examples";
+export const INTEGRATIONS_URL = "/docs/integrations";
export const DEMOS_URL = "/demos";
const promotedGlobalUrls = new Set([
@@ -136,7 +136,7 @@ export function getNestedRootForPathname(pathname: string): NestedDocsRoot | und
export function getDefaultSidebarMode(pathname: string): SidebarMode {
if (isPathWithin(pathname, COOKBOOKS_URL)) return { kind: "cookbooks" };
- if (isPathWithin(pathname, EXAMPLES_URL)) return { kind: "examples" };
+ if (isPathWithin(pathname, INTEGRATIONS_URL)) return { kind: "integrations" };
if (isPathWithin(pathname, DEMOS_URL)) return { kind: "demos" };
if (isPathWithin(pathname, API_REFERENCE_URL)) return { kind: "api-reference" };
@@ -176,7 +176,7 @@ function findNestedFolder(nodes: PageTree.Node[], treeFolder: string): PageTree.
return undefined;
}
-/** The sidebar for a top-level tab (Cookbooks, Examples, Demos, API Reference) is its content folder. */
+/** The sidebar for a top-level tab (Cookbooks, Integrations, Demos, API Reference) is its content folder. */
export function getTabTree(tree: PageTree.Root, treeFolder: TabFolder): PageTree.Root {
const folder = findNestedFolder(tree.children, treeFolder);
if (!folder) throw new Error(`Docs folder "${treeFolder}" was not found in the page tree.`);
diff --git a/docs/lib/examples-catalog.ts b/docs/lib/examples-catalog.ts
index 30ae3a6c9..20da5bee4 100644
--- a/docs/lib/examples-catalog.ts
+++ b/docs/lib/examples-catalog.ts
@@ -20,6 +20,48 @@ const EXAMPLE_GUIDES: Record<string, string> = {
"miscellaneous/react-email": "/docs/openui-lang/examples/miscellaneous/react-email",
};
+/**
+ * Logo for each example's card, keyed by its path in `examples/`. Logos match the marketing
+ * integrations page. Examples without an entry show the OpenUI mark.
+ */
+const EXAMPLE_LOGOS: Record<string, string> = {
+ "agent-frameworks/google-adk": "/integration-logos/google.svg",
+ "agent-frameworks/langgraph-platform":
+ "https://raw.githubusercontent.com/langchain-ai/docs/main/src/images/brand/langchain-icon.png",
+ "agent-frameworks/mastra": "/integration-logos/mastra.svg",
+ "agent-frameworks/vercel-ai-sdk": "/integration-logos/vercel.svg",
+ "agent-frameworks/vercel-eve":
+ "https://raw.githubusercontent.com/vercel/eve/main/.github/assets/eve.svg",
+ "app-frameworks/angular": "/integration-logos/angular.svg",
+ "app-frameworks/fastapi": "/integration-logos/fastapi.svg",
+ "app-frameworks/react-native": "/integration-logos/react.svg",
+ "app-frameworks/svelte": "/integration-logos/svelte.svg",
+ "app-frameworks/vue": "/integration-logos/vue.svg",
+ "design-systems/material-ui": "/integration-logos/mui.svg",
+ "design-systems/shadcn": "/integration-logos/shadcn-ui.svg",
+ "harnesses/grok-build":
+ "https://media.x.ai/v1/website/spacexai-symbol-black-transparent-6435cf42.png",
+ "harnesses/pi": "/integration-logos/pi.svg",
+ "miscellaneous/autofix": "/favicon.svg",
+ "miscellaneous/handsontable":
+ "https://raw.githubusercontent.com/handsontable/handsontable/develop/docs/public/favicon.png",
+ "miscellaneous/html-artifact": "/favicon.svg",
+ "miscellaneous/react-email": "/integration-logos/react-email.svg",
+ "miscellaneous/supabase": "/integration-logos/supabase.svg",
+};
+
+/** Examples whose logo is a black mark, inverted in dark mode so it stays visible. */
+const DARK_LOGOS = new Set([
+ "agent-frameworks/mastra",
+ "agent-frameworks/vercel-ai-sdk",
+ "agent-frameworks/vercel-eve",
+ "app-frameworks/angular",
+ "design-systems/shadcn",
+ "harnesses/grok-build",
+ "harnesses/pi",
+ "miscellaneous/react-email",
+]);
+
export type RepoExample = {
/** The name `openui create --example` accepts: the last segment of the path. */
name: string;
@@ -28,6 +70,8 @@ export type RepoExample = {
category: ExampleCategoryId;
sourceUrl: string;
guideUrl?: string;
+ logo: string;
+ logoIsDark: boolean;
/** Environment setup used by the CLI while scaffolding. */
env?: { file: string; key?: string };
};
@@ -42,6 +86,8 @@ export const REPO_EXAMPLES: RepoExample[] = catalog.examples.map((example) => {
category,
sourceUrl: `${EXAMPLES_REPO_URL}/${example.path}`,
guideUrl: EXAMPLE_GUIDES[example.path],
+ logo: EXAMPLE_LOGOS[example.path] ?? "/favicon.svg",
+ logoIsDark: DARK_LOGOS.has(example.path),
env: example.env,
};
});
diff --git a/docs/lib/showcase-content.test.ts b/docs/lib/showcase-content.test.ts
index b13e05fab..bdb4efe9f 100644
--- a/docs/lib/showcase-content.test.ts
+++ b/docs/lib/showcase-content.test.ts
@@ -4,23 +4,20 @@ import { join } from "node:path";
import { describe, it } from "node:test";
import { EXAMPLE_CATEGORIES } from "./example-categories";
-const contentRoot = join(import.meta.dirname, "../content/docs");
+const integrationsPage = readFileSync(
+ join(import.meta.dirname, "../content/docs/integrations/index.mdx"),
+ "utf8",
+);
-function sidebarLinks(folder: string): string[] {
- const meta = JSON.parse(readFileSync(join(contentRoot, folder, "meta.json"), "utf8")) as {
- pages: string[];
- };
- return meta.pages.flatMap((entry) => entry.match(/\((?<url>[^)]+)\)$/)?.groups?.url ?? []);
-}
-
-describe("showcase sidebars", () => {
- // The Examples sidebar links to sections that RepoExamples renders from EXAMPLE_CATEGORIES.
- it("links to every example category", () => {
- const links = sidebarLinks("examples");
+describe("integrations page", () => {
+ // Section headings live in the MDX so they show in the TOC; ExampleCategory renders the cards.
+ it("has a heading and cards for every example category", () => {
for (const category of EXAMPLE_CATEGORIES) {
assert.ok(
- links.includes(`/examples#${category.id}`),
- `Missing sidebar link for ${category.id}`,
+ integrationsPage.includes(
+ `## ${category.title}\n\n<ExampleCategory id="${category.id}" />`,
+ ),
+ `Missing section for ${category.id}`,
);
}
});
diff --git a/docs/lib/source.ts b/docs/lib/source.ts
index 730a5d727..4eefa3db5 100644
--- a/docs/lib/source.ts
+++ b/docs/lib/source.ts
@@ -6,7 +6,7 @@ import { blogPosts, docs } from "fumadocs-mdx:collections/server";
export const BASE_URL = "https://www.openui.com";
/** Docs sections served from their own top-level path, like `/cookbooks`, instead of under `/docs`. */
-export const TOP_LEVEL_SECTIONS = ["cookbooks", "examples", "demos"];
+export const TOP_LEVEL_SECTIONS = ["cookbooks", "demos"];
export function isTopLevelSection(slugs: string[] | undefined): boolean {
return TOP_LEVEL_SECTIONS.includes(slugs?.[0] ?? "");
diff --git a/docs/next.config.mjs b/docs/next.config.mjs
index 15851e065..0819021cf 100644
--- a/docs/next.config.mjs
+++ b/docs/next.config.mjs
@@ -46,12 +46,23 @@ const config = {
destination: "/cookbooks/conversational-analytics",
permanent: false,
},
- // Cookbooks, Examples, and Demos moved from /docs to their own top-level paths.
+ // Cookbooks and Demos moved from /docs to their own top-level paths.
{
- source: "/docs/:section(cookbooks|examples|demos)/:path*",
+ source: "/docs/:section(cookbooks|demos)/:path*",
destination: "/:section/:path*",
permanent: true,
},
+ // The Examples tab is now Integrations, under /docs.
+ {
+ source: "/examples",
+ destination: "/docs/integrations",
+ permanent: true,
+ },
+ {
+ source: "/docs/examples",
+ destination: "/docs/integrations",
+ permanent: true,
+ },
{
source: "/docs/gateway/api/autofix",
destination: "/docs/autofix",
@@ -162,11 +173,6 @@ const config = {
destination: "/docs/build-agents/ui-generation",
permanent: true,
},
- {
- source: "/docs/integrations",
- destination: "/docs/build-agents",
- permanent: true,
- },
...["assistant-ui", "copilotkit"].map((integration) => ({
source: `/docs/integrations/${integration}`,
destination: `/docs/build-agents/${integration}`,
@@ -366,12 +372,12 @@ const config = {
destination: "/llms.mdx/docs/:path*",
},
{
- source: "/:section(cookbooks|examples|demos)/:path*.mdx",
+ source: "/:section(cookbooks|demos)/:path*.mdx",
destination: "/llms.mdx/docs/:section/:path*",
},
{
- source: "/:section(examples|demos).mdx",
- destination: "/llms.mdx/docs/:section",
+ source: "/demos.mdx",
+ destination: "/llms.mdx/docs/demos",
},
];
},
diff --git a/docs/public/integration-logos/fastapi.svg b/docs/public/integration-logos/fastapi.svg
new file mode 100644
index 000000000..665e5a1ab
--- /dev/null
+++ b/docs/public/integration-logos/fastapi.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>FastAPI</title><path fill="#009688" d="M12 .0387C5.3729.0384.0003 5.3931 0 11.9988c-.001 6.6066 5.372 11.9628 12 11.9625 6.628.0003 12.001-5.3559 12-11.9625-.0003-6.6057-5.3729-11.9604-12-11.96m-.829 5.4153h7.55l-7.5805 5.3284h5.1828L5.279 18.5436q2.9466-6.5444 5.892-13.0896"/></svg>
\ No newline at end of file
diff --git a/docs/public/integration-logos/supabase.svg b/docs/public/integration-logos/supabase.svg
new file mode 100644
index 000000000..c8b061c4f
--- /dev/null
+++ b/docs/public/integration-logos/supabase.svg
@@ -0,0 +1 @@
+<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Supabase</title><path fill="#3ECF8E" d="M11.9 1.036c-.015-.986-1.26-1.41-1.874-.637L.764 12.05C-.33 13.427.65 15.455 2.409 15.455h9.579l.113 7.51c.014.985 1.259 1.408 1.873.636l9.262-11.653c1.093-1.375.113-3.403-1.645-3.403h-9.642z"/></svg>
\ No newline at end of file
diff --git a/docs/source.config.ts b/docs/source.config.ts
index a7fbd18ef..1fd132d6b 100644
--- a/docs/source.config.ts
+++ b/docs/source.config.ts
@@ -7,6 +7,10 @@ const docsPageSchema = pageSchema.extend({
customHeader: z.boolean().optional().default(false),
// Hides the previous/next page links at the bottom of the page.
hideFooter: z.boolean().optional().default(false),
+ // Hides the left sidebar. Pages that keep their TOC widen to the `full` page width.
+ sidebar: z.boolean().optional().default(true),
+ // Hides Copy Markdown and Open, for pages whose Markdown is mostly component tags.
+ pageActions: z.boolean().optional().default(true),
});
// You can customise Zod schemas for frontmatter and `meta.json` here