Surfaces

MockIDE

Real code is coming. This is the trailer.

Mock IDE that streams pretokenized code character-by-character with a blinking caret. Pass an array of `IdeToken` objects; each has a class hint for color (key, str, num, com, fn).

Install

Copy this owned-code component into your app from the registry.

pnpm dlx shadcn-svelte@latest add https://benjamin-brady.github.io/performative-ui-svelte/registry/mock-ide.json

Examples

Streaming TS handler
~/synthetica/app/api/route.ts AI is writing…
<MockIDE
  filename="~/synthetica/app/api/route.ts"
  tokens={[
    { c: "// generated by synthetica\n", cls: "com" },
    { c: "export async function ", cls: "key" },
    { c: "POST", cls: "fn" },
    { c: "(req: Request) {\n" },
    // …
  ]}
/>

Props

PropTypeDefaultDescription
filenamestring-Shown in the tab.
tokensIdeToken[]-Source tokens to type out.
loopbooleantrueRestart after a 3s pause.
charMs[number, number][14, 42]Per-char delay range.
thinkingLabelSnippet | false"AI is writing…"Pill label; false to hide.
MockIDE.Chrome
PropTypeDefaultDescription
filenamestring-Tab label.
thinkingSnippet | false-Pill content.
MockIDE.Body
PropTypeDefaultDescription
tokens*IdeToken[]-Tokens to stream.
loopboolean-Loop after finishing.
Next ChatBubble ]