The Open Standard for Generative UI
docs: static tweet wall + home tweaks (#699)
Parikshit Deshmukh4f6bb529c95a
diff --git a/docs/app/(home)/components/StaticTweetCard/StaticTweetCard.module.css b/docs/app/(home)/components/StaticTweetCard/StaticTweetCard.module.cssnew file mode 100644index 000000000..6f096fbb2--- /dev/null+++ b/docs/app/(home)/components/StaticTweetCard/StaticTweetCard.module.css@@ -0,0 +1,204 @@+.card {+ position: relative;+ display: block;+ padding: 0.875rem 1rem 1rem;+ border: 1px solid var(--home-hairline);+ border-radius: 12px;+ background: var(--openui-foreground);+ box-shadow: var(--home-shadow-card);+ color: var(--openui-text-neutral-primary);+ font-family: var(--home-font-text);+ text-decoration: none;+ transition: box-shadow 0.2s ease;+}++[data-theme="dark"] .card {+ background: rgba(255, 255, 255, 0.04);+ box-shadow: none;+}++.card:hover {+ box-shadow: var(--home-card-lift);+}++.header {+ display: flex;+ align-items: center;+ gap: 0.625rem;+}++.avatar {+ width: 40px;+ height: 40px;+ flex-shrink: 0;+ border-radius: 50%;+ object-fit: cover;+ background: var(--home-hairline);+}++.identity {+ display: flex;+ min-width: 0;+ flex-direction: column;+ line-height: 1.25;+}++.name {+ display: inline-flex;+ align-items: center;+ gap: 0.25rem;+ font-size: 0.9375rem;+ font-weight: 700;+}++.nameText {+ overflow: hidden;+ text-overflow: ellipsis;+ white-space: nowrap;+}++.verified {+ flex-shrink: 0;+}++.handle {+ overflow: hidden;+ font-size: 0.875rem;+ color: var(--openui-text-neutral-secondary);+ text-overflow: ellipsis;+ white-space: nowrap;+}++.xlogo {+ display: inline-flex;+ margin-left: auto;+ align-self: flex-start;+ color: var(--openui-text-neutral-primary);+}++.text {+ margin: 0.75rem 0 0;+ font-size: 0.9375rem;+ line-height: 1.45;+ white-space: pre-wrap;+ overflow-wrap: anywhere;+}++.link {+ color: #1d9bf0;+}++.media {+ position: relative;+ margin-top: 0.75rem;+ overflow: hidden;+ border: 1px solid var(--home-hairline);+ border-radius: 14px;+}++.media img {+ display: block;+ width: 100%;+ height: auto;+}++.playButton {+ position: absolute;+ inset: 0;+ display: flex;+ width: 3.25rem;+ height: 3.25rem;+ margin: auto;+ align-items: center;+ justify-content: center;+ border-radius: 50%;+ background: rgba(0, 0, 0, 0.65);+ color: #fff;+ padding-left: 0.15rem;+}++.date {+ display: block;+ margin-top: 0.75rem;+ font-size: 0.8125rem;+ color: var(--openui-text-neutral-secondary);+}++/* Covers the whole card so a click anywhere opens the tweet; the footer controls+ sit above it (z-index) so they handle their own clicks. */+.stretchedLink {+ position: absolute;+ inset: 0;+ z-index: 0;+}++.footer {+ display: flex;+ flex-direction: column;+ gap: 0.625rem;+ margin-top: 0.875rem;+ padding-top: 0.75rem;+ border-top: 1px solid var(--home-hairline);+}++.stats {+ display: flex;+ align-items: center;+ gap: 1rem;+ font-size: 0.8125rem;+ color: var(--openui-text-neutral-secondary);+}++.stat {+ display: inline-flex;+ align-items: center;+ gap: 0.3rem;+}++.statLike svg {+ color: #f91880;+}++.statReply svg {+ color: #1d9bf0;+}++.copyBtn {+ position: relative;+ z-index: 1;+ display: inline-flex;+ align-items: center;+ gap: 0.3rem;+ margin-left: auto;+ padding: 0;+ border: 0;+ background: none;+ color: var(--openui-text-neutral-secondary);+ font: inherit;+ font-size: 0.8125rem;+ cursor: pointer;+ transition: color 0.15s ease;+}++.copyBtn:hover {+ color: #1d9bf0;+}++.cta {+ position: relative;+ z-index: 1;+ display: block;+ padding: 0.5rem;+ border: 1px solid var(--home-hairline);+ border-radius: 999px;+ color: #1d9bf0;+ font-size: 0.875rem;+ font-weight: 600;+ text-align: center;+ text-decoration: none;+ transition: background-color 0.15s ease;+}++.cta:hover {+ background: rgba(29, 155, 240, 0.08);+}diff --git a/docs/app/(home)/components/StaticTweetCard/StaticTweetCard.tsx b/docs/app/(home)/components/StaticTweetCard/StaticTweetCard.tsxnew file mode 100644index 000000000..a7b5b0f03--- /dev/null+++ b/docs/app/(home)/components/StaticTweetCard/StaticTweetCard.tsx@@ -0,0 +1,155 @@+"use client";++import { useState, type JSX, type MouseEvent } from "react";+import type { StaticTweet } from "../../data/home-tweets-static";+import styles from "./StaticTweetCard.module.css";++// Linkify @mentions, #hashtags, full URLs, and bare domains in the accent colour.+function renderText(text: string): (string | JSX.Element)[] {+ const re =+ /(@\w+|#\w+|https?:\/\/[^\s]+|(?:[a-zA-Z0-9-]+\.)+(?:com|dev|ai|org|io|co|net|app|xyz)(?:\/[^\s]*)?)/g;+ const out: (string | JSX.Element)[] = [];+ let last = 0;+ let key = 0;+ let m: RegExpExecArray | null;+ while ((m = re.exec(text)) !== null) {+ if (m.index > last) out.push(text.slice(last, m.index));+ out.push(+ <span key={key++} className={styles.link}>+ {m[0]}+ </span>,+ );+ last = m.index + m[0].length;+ }+ if (last < text.length) out.push(text.slice(last));+ return out;+}++function formatCount(n: number): string {+ if (n >= 1000) return `${(n / 1000).toFixed(n >= 10000 ? 0 : 1).replace(/\.0$/, "")}K`;+ return String(n);+}++function XLogo() {+ return (+ <svg viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true">+ <path d="M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z" />+ </svg>+ );+}++function VerifiedBadge() {+ return (+ <svg viewBox="0 0 24 24" width="16" height="16" fill="#1d9bf0" aria-label="Verified account" className={styles.verified}>+ <path d="M22.25 12c0-1.43-.88-2.67-2.19-3.34.46-1.39.2-2.9-.81-3.91s-2.52-1.27-3.91-.81c-.66-1.31-1.91-2.19-3.34-2.19s-2.68.88-3.34 2.19c-1.39-.46-2.9-.2-3.91.81s-1.26 2.52-.81 3.91c-1.31.66-2.19 1.91-2.19 3.34s.88 2.67 2.19 3.34c-.46 1.39-.2 2.9.81 3.91s2.52 1.26 3.91.81c.66 1.31 1.91 2.19 3.34 2.19s2.68-.88 3.34-2.19c1.39.46 2.9.2 3.91-.81s1.27-2.52.81-3.91c1.31-.67 2.19-1.91 2.19-3.34zm-11.71 4.2L6.8 12.46l1.41-1.42 2.26 2.26 4.8-5.23 1.47 1.36-6.2 6.77z" />+ </svg>+ );+}++function HeartIcon() {+ return (+ <svg viewBox="0 0 24 24" width="15" height="15" fill="currentColor" aria-hidden="true">+ <path d="M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z" />+ </svg>+ );+}++function ReplyIcon() {+ return (+ <svg viewBox="0 0 24 24" width="15" height="15" fill="currentColor" aria-hidden="true">+ <path d="M20 2H4c-1.1 0-2 .9-2 2v18l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2z" />+ </svg>+ );+}++function LinkIcon() {+ return (+ <svg viewBox="0 0 24 24" width="15" height="15" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">+ <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" />+ <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" />+ </svg>+ );+}++export function StaticTweetCard({ tweet }: { tweet: StaticTweet }) {+ const url = `https://x.com/${tweet.handle}/status/${tweet.id}`;+ const [copied, setCopied] = useState(false);++ const copyLink = (e: MouseEvent<HTMLButtonElement>) => {+ e.preventDefault();+ e.stopPropagation();+ navigator.clipboard+ ?.writeText(url)+ .then(() => {+ setCopied(true);+ setTimeout(() => setCopied(false), 1500);+ })+ .catch(() => {});+ };++ return (+ <div className={styles.card}>+ {/* Stretched link: the whole card opens the tweet; footer controls sit above it. */}+ <a+ href={url}+ target="_blank"+ rel="noopener noreferrer"+ className={styles.stretchedLink}+ aria-label={`Tweet by ${tweet.name}`}+ />++ <div className={styles.header}>+ {/* eslint-disable-next-line @next/next/no-img-element */}+ <img className={styles.avatar} src={tweet.avatar} alt="" width={40} height={40} loading="lazy" />+ <div className={styles.identity}>+ <span className={styles.name}>+ <span className={styles.nameText}>{tweet.name}</span>+ {tweet.verified && <VerifiedBadge />}+ </span>+ <span className={styles.handle}>@{tweet.handle}</span>+ </div>+ <span className={styles.xlogo} aria-hidden="true">+ <XLogo />+ </span>+ </div>++ <p className={styles.text}>{renderText(tweet.text)}</p>++ {tweet.media && (+ <div className={styles.media} data-type={tweet.media.type}>+ {/* eslint-disable-next-line @next/next/no-img-element */}+ <img src={tweet.media.url} alt="" loading="lazy" />+ {tweet.media.type === "video" && (+ <span className={styles.playButton} aria-hidden="true">+ <svg viewBox="0 0 24 24" width="22" height="22" fill="currentColor">+ <path d="M8 5v14l11-7z" />+ </svg>+ </span>+ )}+ </div>+ )}++ <span className={styles.date}>{tweet.date}</span>++ <div className={styles.footer}>+ <div className={styles.stats}>+ <span className={`${styles.stat} ${styles.statLike}`}>+ <HeartIcon />+ {formatCount(tweet.likes)}+ </span>+ <span className={`${styles.stat} ${styles.statReply}`}>+ <ReplyIcon />+ {formatCount(tweet.replies)}+ </span>+ <button type="button" className={styles.copyBtn} onClick={copyLink}>+ <LinkIcon />+ {copied ? "Copied" : "Copy link"}+ </button>+ </div>+ <a href={url} target="_blank" rel="noopener noreferrer" className={styles.cta}>+ Read more on X+ </a>+ </div>+ </div>+ );+}diff --git a/docs/app/(home)/components/TweetWall/TweetWall.module.css b/docs/app/(home)/components/TweetWall/TweetWall.module.cssindex 9076b74db..23dc7a915 100644--- a/docs/app/(home)/components/TweetWall/TweetWall.module.css+++ b/docs/app/(home)/components/TweetWall/TweetWall.module.css@@ -1,7 +1,7 @@.root {position: relative;width: 100%;- height: 40rem;+ height: 50rem;overflow: hidden;/* Fade the top and bottom edges. */-webkit-mask-image: linear-gradient(@@ -18,13 +18,6 @@#000 calc(100% - 3.5rem),transparent 100%);- /* Stay hidden until every embed resolves, so the load never flickers in view. */- opacity: 0;- transition: opacity 0.5s ease;-}--.ready {- opacity: 1;}.columns {@@ -44,7 +37,7 @@}/* Pure-CSS marquee: two identical copies, slide up by exactly one copy. No JS- measurement, so it cannot drift or jump as embeds load. */+ measurement, so it cannot drift or jump. */.track {display: flex;flex-direction: column;@@ -58,18 +51,8 @@.slot {width: 100%;margin-bottom: 0.75rem;- border-radius: 12px;- overflow: hidden;}-.slot :global(iframe) {- width: 100% !important;- max-width: 100% !important;- margin: 0 !important;- border-radius: 12px !important;-}--@keyframes tweetScroll {to {transform: translateY(-50%);@@ -98,10 +81,8 @@flex: 0 0 200px;}- /* Twitter won't render an embed narrower than 250px, so render at 250 (no- cropping) and scale the whole card down with zoom. Unlike transform, zoom- shrinks the layout box too, so columns stay tight and the loop has no gaps.- 250 * 0.8 = 200, matching the column width. */+ /* Render the card at 250px then scale the whole box down with zoom (shrinks the+ layout box too, so columns stay tight and the loop has no gaps). 250 * 0.8 = 200. */.slot {width: 250px;zoom: 0.8;diff --git a/docs/app/(home)/components/TweetWall/TweetWall.tsx b/docs/app/(home)/components/TweetWall/TweetWall.tsxindex be76eb1fc..ea4cdff59 100644--- a/docs/app/(home)/components/TweetWall/TweetWall.tsx+++ b/docs/app/(home)/components/TweetWall/TweetWall.tsx@@ -1,22 +1,17 @@"use client";-import { useTheme } from "next-themes";-import Script from "next/script";-import { useEffect, useRef, useState } from "react";-import { HOME_TWEETS, type HomeTweetEmbed } from "../../data/home-tweet-embeds";+import { useEffect, useState } from "react";+import { STATIC_TWEETS, type StaticTweet } from "../../data/home-tweets-static";+import { StaticTweetCard } from "../StaticTweetCard/StaticTweetCard";import styles from "./TweetWall.module.css";const DESKTOP_COLUMNS = 4;const MOBILE_COLUMNS = 3;const DESKTOP_QUERY = "(min-width: 900px)";-const DESKTOP_EMBED_WIDTH = 360;-// Twitter clamps embeds to a 250px minimum; render at 250 (no cropping) and scale-// the rendered card down with CSS on mobile.-const MOBILE_EMBED_WIDTH = 250;// Per-column scroll duration (s), direction, and a starting phase offset so the-// columns never line up. The marquee itself is pure CSS (translateY 0 -> -50% over-// two duplicated copies), so there is no measurement to drift or flicker.+// columns never line up. The marquee is pure CSS (translateY 0 -> -50% over two+// duplicated copies), so there is nothing to measure and it cannot drift.const COLUMNS_META = [{ duration: 36, reverse: false, delay: -4 },{ duration: 30, reverse: true, delay: -13 },@@ -24,129 +19,39 @@ const COLUMNS_META = [{ duration: 33, reverse: true, delay: -19 },] as const;-function splitIntoColumns(items: HomeTweetEmbed[], count: number): HomeTweetEmbed[][] {- const columns = Array.from({ length: count }, () => [] as HomeTweetEmbed[]);+function splitIntoColumns(items: StaticTweet[], count: number): StaticTweet[][] {+ const columns = Array.from({ length: count }, () => [] as StaticTweet[]);items.forEach((item, index) => columns[index % count]!.push(item));return columns;}export function TweetWall() {- const rootRef = useRef<HTMLDivElement>(null);- const { resolvedTheme } = useTheme();- const [scriptReady, setScriptReady] = useState(false);const [mounted, setMounted] = useState(false);const [columnCount, setColumnCount] = useState(DESKTOP_COLUMNS);- const [ready, setReady] = useState(false);- // The last column count an embed pass ran for. Lets us tell a "fresh slots"- // pass (first mount / column-count change → empty slots) from a theme re-embed- // (slots already hold tweets), so a theme switch never blanks the wall.- const lastColumnCount = useRef<number | null>(null);-- // Always a defined "light" | "dark" (resolvedTheme is undefined until next-themes- // resolves on the client), so the embed effect's dependency never changes shape.- const embedTheme = resolvedTheme === "dark" ? "dark" : "light";// Resolve the column count on the client only. The columns render after mount// (the outer root still server-renders to reserve height), so there is no- // SSR/hydration column-count swap and the embed pass runs exactly once.+ // SSR/hydration column-count swap.useEffect(() => {const query = window.matchMedia(DESKTOP_QUERY);const update = () => setColumnCount(query.matches ? DESKTOP_COLUMNS : MOBILE_COLUMNS);update();setMounted(true);- // If widgets.js is already loaded (e.g. a client-side navigation back to this- // page, where next/script won't re-fire onLoad), mark it ready now. Otherwise- // scriptReady stays false on return and the wall renders permanently blank.- if (window.twttr?.widgets?.createTweet) setScriptReady(true);query.addEventListener("change", update);return () => query.removeEventListener("change", update);}, []);- // Embed every slot once the columns are mounted and the widget script is ready.- // Re-runs if the column count changes (which swaps the slots and their target- // width). The wall stays hidden until all embeds resolve, so it never flickers in.- useEffect(() => {- if (!mounted || !scriptReady) return;- const root = rootRef.current;- const createTweet = window.twttr?.widgets?.createTweet;- if (!root || !createTweet) return;-- let cancelled = false;- const width = columnCount >= DESKTOP_COLUMNS ? DESKTOP_EMBED_WIDTH : MOBILE_EMBED_WIDTH;- const slots = Array.from(root.querySelectorAll<HTMLElement>("[data-tweet-id]"));-- // Hide the wall only when the slots are empty — i.e. the first mount or a- // column-count change re-rendered fresh slots. A theme switch re-embeds into- // slots that already hold tweets, so keep those visible; otherwise a slow or- // Twitter-throttled re-embed would leave the whole opacity:0 wall hidden.- const slotsAreFresh = lastColumnCount.current !== columnCount;- lastColumnCount.current = columnCount;- if (slotsAreFresh) setReady(false);-- // Twitter throttles bursts of embed creation (every theme toggle fires one),- // and a throttled createTweet can hang indefinitely. Cap each one so the- // readiness promise always settles and the wall can never get stuck hidden.- const EMBED_TIMEOUT_MS = 7000;- const withTimeout = <T,>(promise: Promise<T>) =>- Promise.race([promise, new Promise<void>((resolve) => setTimeout(resolve, EMBED_TIMEOUT_MS))]);-- void Promise.allSettled(- slots.map(async (slot) => {- const id = slot.dataset.tweetId;- if (!id) return;- // Build the new embed in a detached node and swap it in only once it- // resolves, so the currently-visible tweet isn't cleared mid-re-embed- // (no blank flash on theme switch). On timeout, the old tweet stays.- const staging = document.createElement("div");- await withTimeout(- createTweet(id, staging, {- align: "center",- conversation: slot.dataset.conversation === "all" ? "all" : "none",- dnt: true,- // White card in light mode; dark card in dark mode. Twitter's "dark"- // theme is a bluish near-black (#15202b) — a CSS filter on the iframe- // (see the [data-theme="dark"] .slot rule) neutralises the blue to gray.- theme: embedTheme,- width,- }),- );- if (cancelled || staging.childNodes.length === 0) return;- slot.replaceChildren(...staging.childNodes);- }),- ).then(() => {- if (!cancelled) setReady(true);- });-- return () => {- cancelled = true;- };- }, [mounted, scriptReady, columnCount, embedTheme]);-- const columns = splitIntoColumns(HOME_TWEETS, columnCount);+ const columns = splitIntoColumns(STATIC_TWEETS, columnCount);return (- <>- <Script- id="twitter-widgets-js"- src="https://platform.twitter.com/widgets.js"- strategy="lazyOnload"- onLoad={() => setScriptReady(true)}- />-- <div- ref={rootRef}- className={`${styles.root} ${ready ? styles.ready : ""}`.trim()}- role="region"- aria-label="What people are saying on X"- >- {mounted && (+ <div className={styles.root} role="region" aria-label="What people are saying on X">+ {mounted && (<div className={styles.columns}>{columns.map((column, columnIndex) => {const meta = COLUMNS_META[columnIndex % COLUMNS_META.length]!;// On mobile (3 columns) the centre column scrolls up and the outer// columns scroll down; desktop keeps the COLUMNS_META directions.- const reverse =- columnCount === MOBILE_COLUMNS ? columnIndex !== 1 : meta.reverse;+ const reverse = columnCount === MOBILE_COLUMNS ? columnIndex !== 1 : meta.reverse;return (<div className={styles.column} key={columnIndex}><div@@ -162,10 +67,10 @@ export function TweetWall() {<divkey={`${columnIndex}-${index}-${copy}`}className={styles.slot}- data-tweet-id={tweet.id}- data-conversation={tweet.conversation ?? "none"}aria-hidden={copy === 1 || undefined}- />+ >+ <StaticTweetCard tweet={tweet} />+ </div>)),)}</div>@@ -173,8 +78,7 @@ export function TweetWall() {);})}</div>- )}- </div>- </>+ )}+ </div>);}diff --git a/docs/app/(home)/data/home-tweets-static.ts b/docs/app/(home)/data/home-tweets-static.tsnew file mode 100644index 000000000..5eac36292--- /dev/null+++ b/docs/app/(home)/data/home-tweets-static.ts@@ -0,0 +1,130 @@+// Static snapshot of the home tweet wall, generated by scripts/fetch-static-tweets.mjs.+// Avatars/media live in public/tweets/ (downloaded by the script, no Twitter dependency).+// To refresh, or to change which tweets appear (edit the IDs in home-tweet-embeds.ts),+// run `pnpm fetch:tweets`. Generated file, do not edit by hand.+export type StaticTweet = {+ id: string;+ name: string;+ handle: string;+ verified: boolean;+ avatar: string;+ text: string;+ date: string;+ likes: number;+ replies: number;+ media?: { type: "photo" | "video"; url: string };+};++export const STATIC_TWEETS: StaticTweet[] = [+ {+ "id": "2031845364286783776",+ "name": "Chris Tate",+ "handle": "ctatedev",+ "verified": true,+ "avatar": "/tweets/avatar-ctatedev.jpg",+ "text": "@rabi_guha Very cool!",+ "date": "Mar 11, 2026",+ "likes": 30,+ "replies": 1+ },+ {+ "id": "2031989015147397122",+ "name": "rahulmax",+ "handle": "rahulmax",+ "verified": true,+ "avatar": "/tweets/avatar-rahulmax.jpg",+ "text": "@rabi_guha Been a fan of Thesys! The craft in UX and interaction is unmatched. Congrats! \n\nWas open-sourcing OpenUI always the plan, or did watching JSON break at scale across 10k+ devs force the shift to making the format a shared standard?",+ "date": "Mar 12, 2026",+ "likes": 0,+ "replies": 1+ },+ {+ "id": "2031891607394664677",+ "name": "jinjingliang",+ "handle": "JinjingLiang",+ "verified": true,+ "avatar": "/tweets/avatar-JinjingLiang.jpg",+ "text": "@rabi_guha Just tried it. Pretty cool",+ "date": "Mar 12, 2026",+ "likes": 9,+ "replies": 0,+ "media": {+ "type": "video",+ "url": "/tweets/media-2031891607394664677.jpg"+ }+ },+ {+ "id": "2034082798051443052",+ "name": "shadcn",+ "handle": "shadcn",+ "verified": true,+ "avatar": "/tweets/avatar-shadcn.jpg",+ "text": "@rabi_guha Looks great. Will give it a try. 👀",+ "date": "Mar 18, 2026",+ "likes": 26,+ "replies": 1+ },+ {+ "id": "2034668122691735612",+ "name": "LangChain JS",+ "handle": "LangChain_JS",+ "verified": true,+ "avatar": "/tweets/avatar-LangChain_JS.jpg",+ "text": "AI just built a full dashboard UI… while thinking🤔\n\nWe added @thesysdev’s OpenUI to @LangChain frontend docs 👀 with a live demo.\n\nAsk an agent for a report → watch it stream:\n• KPI cards\n• charts\n• tables\n• structured layouts\nNo templates. No hardcoded components.\nJust",+ "date": "Mar 19, 2026",+ "likes": 43,+ "replies": 3,+ "media": {+ "type": "video",+ "url": "/tweets/media-2034668122691735612.jpg"+ }+ },+ {+ "id": "2034668644115107891",+ "name": "Christian Bromann",+ "handle": "bromann",+ "verified": true,+ "avatar": "/tweets/avatar-bromann.jpg",+ "text": "I am very bullish on OpenUI (openui.com) .. it comes with great components out of the box, streaming protocol is super efficient and has a super small footprint!\n\nAlso .. very easy to put together with @LangChain_JS 🚀",+ "date": "Mar 19, 2026",+ "likes": 58,+ "replies": 3+ },+ {+ "id": "2039548793960681815",+ "name": "AB",+ "handle": "abhin_27",+ "verified": false,+ "avatar": "/tweets/avatar-abhin_27.jpg",+ "text": "Thanks @rabi_guha! For me, OpenUI Lang is the unlock - the absurdly token efficient standard. So many possibilities when you're shipping full component trees over the wire. Excited to keep contributing to its growth!",+ "date": "Apr 2, 2026",+ "likes": 3,+ "replies": 0+ },+ {+ "id": "2032387346616758375",+ "name": "Pere",+ "handle": "pmontp19",+ "verified": false,+ "avatar": "/tweets/avatar-pmontp19.jpg",+ "text": "These guys cooked. How does it work? They build an AST from all OpenUI Lang statements response, compile the library's JSON Schema into a param catalog to map args to props, validate fields, then React walks the element tree calling each component's render function recursively",+ "date": "Mar 13, 2026",+ "likes": 13,+ "replies": 0+ },+ {+ "id": "2034284259805176222",+ "name": "Yasuhiro Yokota@タイミー",+ "handle": "yktyshr",+ "verified": false,+ "avatar": "/tweets/avatar-yktyshr.jpg",+ "text": "Generative UIのライブラリ OpenUIのPlaygroundさわれる\nopenui.com/playground",+ "date": "Mar 18, 2026",+ "likes": 8,+ "replies": 0,+ "media": {+ "type": "photo",+ "url": "/tweets/media-2034284259805176222.jpg"+ }+ }+];diff --git a/docs/app/(home)/sections/FeatureGridSection/FeatureGridSection.module.css b/docs/app/(home)/sections/FeatureGridSection/FeatureGridSection.module.cssindex 3be029e46..596f12031 100644--- a/docs/app/(home)/sections/FeatureGridSection/FeatureGridSection.module.css+++ b/docs/app/(home)/sections/FeatureGridSection/FeatureGridSection.module.css@@ -107,6 +107,17 @@margin-top: clamp(3rem, 6vw, 6rem);}+/* Desktop-only line break between the two sentences of the compat description. */+.compatDescBreak {+ display: none;+}++@media (min-width: 1024px) {+ .compatDescBreak {+ display: inline;+ }+}+.separatorBottom {margin-top: clamp(2.5rem, 5vw, 3.5rem);}diff --git a/docs/app/(home)/sections/FeatureGridSection/FeatureGridSection.tsx b/docs/app/(home)/sections/FeatureGridSection/FeatureGridSection.tsxindex e36f73c87..cb15bf795 100644--- a/docs/app/(home)/sections/FeatureGridSection/FeatureGridSection.tsx+++ b/docs/app/(home)/sections/FeatureGridSection/FeatureGridSection.tsx@@ -136,7 +136,13 @@ export function FeatureGridSection({<CompatibilitySectionembeddedtitle="OpenUI works with any stack"- description="OpenUI works with any LLM, UI library, and agent framework. Add generative UI without changing your stack."+ description={+ <>+ OpenUI works with any LLM, UI library, and agent framework.{" "}+ <br className={styles.compatDescBreak} />+ Add generative UI without changing your stack.+ </>+ }/></div></>diff --git a/docs/components/site-primary-nav.tsx b/docs/components/site-primary-nav.tsxindex 0d8a21a49..51c722e9c 100644--- a/docs/components/site-primary-nav.tsx+++ b/docs/components/site-primary-nav.tsx@@ -40,7 +40,6 @@ export const PRIMARY_SITE_NAV_ITEMS: NavItem[] = [title: "Dashboard Demo",description: "Testdrive a dashboard building experience.",href: "/demo/github",- newTab: true,},],},diff --git a/docs/package.json b/docs/package.jsonindex a15f02a3c..d140447fb 100644--- a/docs/package.json+++ b/docs/package.json@@ -4,6 +4,7 @@"private": true,"scripts": {"generate:prompts": "pnpm --filter @openuidev/cli build && pnpm exec openui generate lib/chat-library.ts --out generated/chat-system-prompt.txt && pnpm exec openui generate lib/playground-library.ts --out generated/playground-system-prompt.txt && pnpm exec openui generate lib/playground-library.ts --json-schema --out generated/playground-component-spec.json",+ "fetch:tweets": "node scripts/fetch-static-tweets.mjs","build": "next build","dev": "pnpm generate:prompts && next dev","start": "next start",diff --git a/docs/public/tweets/avatar-JinjingLiang.jpg b/docs/public/tweets/avatar-JinjingLiang.jpgnew file mode 100644index 000000000..29506eb2cBinary files /dev/null and b/docs/public/tweets/avatar-JinjingLiang.jpg differdiff --git a/docs/public/tweets/avatar-LangChain_JS.jpg b/docs/public/tweets/avatar-LangChain_JS.jpgnew file mode 100644index 000000000..196b0ae3cBinary files /dev/null and b/docs/public/tweets/avatar-LangChain_JS.jpg differdiff --git a/docs/public/tweets/avatar-abhin_27.jpg b/docs/public/tweets/avatar-abhin_27.jpgnew file mode 100644index 000000000..f2beb1dc7Binary files /dev/null and b/docs/public/tweets/avatar-abhin_27.jpg differdiff --git a/docs/public/tweets/avatar-bromann.jpg b/docs/public/tweets/avatar-bromann.jpgnew file mode 100644index 000000000..b8d6acfcaBinary files /dev/null and b/docs/public/tweets/avatar-bromann.jpg differdiff --git a/docs/public/tweets/avatar-ctatedev.jpg b/docs/public/tweets/avatar-ctatedev.jpgnew file mode 100644index 000000000..7bf6c5e40Binary files /dev/null and b/docs/public/tweets/avatar-ctatedev.jpg differdiff --git a/docs/public/tweets/avatar-pmontp19.jpg b/docs/public/tweets/avatar-pmontp19.jpgnew file mode 100644index 000000000..d605648a9Binary files /dev/null and b/docs/public/tweets/avatar-pmontp19.jpg differdiff --git a/docs/public/tweets/avatar-rahulmax.jpg b/docs/public/tweets/avatar-rahulmax.jpgnew file mode 100644index 000000000..a3185eecaBinary files /dev/null and b/docs/public/tweets/avatar-rahulmax.jpg differdiff --git a/docs/public/tweets/avatar-shadcn.jpg b/docs/public/tweets/avatar-shadcn.jpgnew file mode 100644index 000000000..320d043a7Binary files /dev/null and b/docs/public/tweets/avatar-shadcn.jpg differdiff --git a/docs/public/tweets/avatar-yktyshr.jpg b/docs/public/tweets/avatar-yktyshr.jpgnew file mode 100644index 000000000..3a193f4a9Binary files /dev/null and b/docs/public/tweets/avatar-yktyshr.jpg differdiff --git a/docs/public/tweets/media-2031891607394664677.jpg b/docs/public/tweets/media-2031891607394664677.jpgnew file mode 100644index 000000000..ea65a7ccfBinary files /dev/null and b/docs/public/tweets/media-2031891607394664677.jpg differdiff --git a/docs/public/tweets/media-2034284259805176222.jpg b/docs/public/tweets/media-2034284259805176222.jpgnew file mode 100644index 000000000..1e801c505Binary files /dev/null and b/docs/public/tweets/media-2034284259805176222.jpg differdiff --git a/docs/public/tweets/media-2034668122691735612.jpg b/docs/public/tweets/media-2034668122691735612.jpgnew file mode 100644index 000000000..932c51939Binary files /dev/null and b/docs/public/tweets/media-2034668122691735612.jpg differdiff --git a/docs/scripts/fetch-static-tweets.mjs b/docs/scripts/fetch-static-tweets.mjsnew file mode 100644index 000000000..ed843eeef--- /dev/null+++ b/docs/scripts/fetch-static-tweets.mjs@@ -0,0 +1,117 @@+// Regenerates the static tweet-wall data (app/(home)/data/home-tweets-static.ts)+// AND downloads the avatars / media into public/tweets/, so the wall has zero+// runtime dependency on Twitter. Data comes from Twitter's public syndication+// endpoint (cdn.syndication.twimg.com, no API key).+//+// Usage:+// pnpm --filter @openuidev/docs fetch:tweets (or: cd docs && pnpm fetch:tweets)+//+// To change WHICH tweets appear, edit the ID list in+// app/(home)/data/home-tweet-embeds.ts+// (the single source shared with the marquee) and re-run this script.++import { mkdirSync, readFileSync, writeFileSync } from "node:fs";+import { dirname, resolve } from "node:path";+import { fileURLToPath } from "node:url";++const here = dirname(fileURLToPath(import.meta.url));+const EMBEDS_FILE = resolve(here, "../app/(home)/data/home-tweet-embeds.ts");+const OUT_FILE = resolve(here, "../app/(home)/data/home-tweets-static.ts");+const PUBLIC_DIR = resolve(here, "../public/tweets");++mkdirSync(PUBLIC_DIR, { recursive: true });++// Read the canonical tweet ID list (entries look like `{ id: "123...", ... }`).+const embedsSrc = readFileSync(EMBEDS_FILE, "utf8");+const IDS = [...embedsSrc.matchAll(/id:\s*"(\d+)"/g)].map((m) => m[1]);+if (IDS.length === 0) {+ console.error(`No tweet IDs found in ${EMBEDS_FILE}`);+ process.exit(1);+}++const token = (id) => ((Number(id) / 1e15) * Math.PI).toString(36).replace(/(0+|\.)/g, "");+const UA = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15";+const MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];+const fmtDate = (iso) => {+ const d = new Date(iso);+ return `${MONTHS[d.getUTCMonth()]} ${d.getUTCDate()}, ${d.getUTCFullYear()}`;+};+const extOf = (url) => (url.split("?")[0].match(/\.([a-z0-9]+)$/i)?.[1] || "jpg").toLowerCase();++async function download(url, filename) {+ const res = await fetch(url, { headers: { "User-Agent": UA } });+ if (!res.ok) throw new Error(`${url} -> HTTP ${res.status}`);+ writeFileSync(resolve(PUBLIC_DIR, filename), Buffer.from(await res.arrayBuffer()));+ return `/tweets/${filename}`;+}++const out = [];+for (const id of IDS) {+ const r = await fetch(+ `https://cdn.syndication.twimg.com/tweet-result?id=${id}&token=${token(id)}&lang=en`,+ { headers: { "User-Agent": UA } },+ );+ if (!r.ok) {+ console.error(` ${id}: HTTP ${r.status} (skipped)`);+ continue;+ }+ const d = await r.json();+ const md = d.mediaDetails || [];+ const handle = d.user?.screen_name || id;++ let text = (d.text || "").trim();+ for (const u of d.entities?.urls || []) {+ if (u.url && u.display_url) text = text.split(u.url).join(u.display_url);+ }+ if (md.length) text = text.replace(/\s*https:\/\/t\.co\/\S+\s*$/, "").trim();++ const avatarUrl = (d.user?.profile_image_url_https || "").replace("_normal.", "_bigger.");++ const entry = {+ id,+ name: d.user?.name || "",+ handle,+ verified: !!(d.user?.is_blue_verified || d.user?.verified),+ avatar: avatarUrl ? await download(avatarUrl, `avatar-${handle}.${extOf(avatarUrl)}`) : "",+ text,+ date: d.created_at ? fmtDate(d.created_at) : "",+ likes: d.favorite_count ?? 0,+ replies: d.conversation_count ?? 0,+ };+ // Omit `media` entirely when absent so the generated literal stays assignable to+ // the optional `media?` field (a `media: null` would fail tsc).+ if (md.length) {+ const m = md[0];+ entry.media = {+ type: m.type === "photo" ? "photo" : "video",+ url: await download(m.media_url_https, `media-${id}.${extOf(m.media_url_https)}`),+ };+ }+ out.push(entry);+}++const ts = `// Static snapshot of the home tweet wall, generated by scripts/fetch-static-tweets.mjs.+// Avatars/media live in public/tweets/ (downloaded by the script, no Twitter dependency).+// To refresh, or to change which tweets appear (edit the IDs in home-tweet-embeds.ts),+// run \`pnpm fetch:tweets\`. Generated file, do not edit by hand.+export type StaticTweet = {+ id: string;+ name: string;+ handle: string;+ verified: boolean;+ avatar: string;+ text: string;+ date: string;+ likes: number;+ replies: number;+ media?: { type: "photo" | "video"; url: string };+};++export const STATIC_TWEETS: StaticTweet[] = ${JSON.stringify(out, null, 2)};+`;++writeFileSync(OUT_FILE, ts);+console.log(`Wrote ${out.length} tweets to ${OUT_FILE}`);+out.forEach((t) =>+ console.log(` @${t.handle.padEnd(15)} likes=${String(t.likes).padStart(3)} replies=${String(t.replies).padStart(2)} media=${t.media?.type || "-"} avatar=${t.avatar}`),+);