Compare supplied code and output
Check the generated moduleComplete
export function canSend(draft: string) {
return draft.trim().length > 0;
}2 checks passed No errors found.
Combines a tool-status disclosure with keyboard-accessible code and output tabs.
export function canSend(draft: string) {
return draft.trim().length > 0;
}2 checks passed No errors found.
export function canSend(draft: string) {
return draft.trim().length > 0;
}2 checks passed No errors found.
npm install @noorddev/vlak-react
Load the stylesheet once at your app root, then import the components you use.
import "@noorddev/vlak-react/css";
import { Sandbox } from "@noorddev/vlak-react";Per-component imports are available at @noorddev/vlak-react/components/sandbox.
npx @noorddev/vlak-cli add sandbox
Adds the component and its dependencies to components/vlak/. Follow the StyleX setup to compile the source in your application.
npx shadcn add https://vlak.dev/r/sandbox.json
Installs the same source through the shadcn CLI.
import { Sandbox } from "@noorddev/vlak-react";
<Sandbox title="Check generated module" state="complete" code="export const ready = true;" language="TypeScript" output="2 checks passed" />See the integration example to compose these components with your application's model and data.
A code/output disclosure. Execution and process isolation remain application-owned.
| Prop | Type | Default | Description |
|---|---|---|---|
coderequired | string | ||
language | string | "Text" | |
output | ReactNode | ||
codeContent | ReactNode | ||
tab | "output" | "code" | ||
defaultTab | "output" | "code" | "code" | |
onTabChange | (tab: "code" | "output") => void | ||
titlerequired | ReactNode | Name of the application-owned tool operation. | |
state | ToolCallState | ||
statusLabel | string | More precise supplied progress, for example approval or input preparation. | |
error | string | ||
defaultOpen | boolean | true | |
onOpenChange | (open: boolean) => void |
Also accepts Omit<DetailsHTMLAttributes<HTMLDetailsElement>, "title">.
The ref reaches HTMLDetailsElement.
| Keys | Does |
|---|---|
| Tab | Tab reaches the native disclosure, active tab and controls inside the selected panel. |
| Arrow keys, Home, End, Enter, Space | Arrow keys, Home and End move between code/output tabs; Enter or Space activates the focused control. |
The same styles are available as CSS. Native HTML provides the static presentation; React or application code supplies state updates and actions.
npm install @noorddev/vlak
import "@noorddev/vlak/css";
<details class="rs-tool-call rs-sandbox" open><summary class="rs-tool-call-summary"><span class="rs-tool-call-title">Check generated module</span><span class="rs-tool-call-state">Complete</span></summary><div class="rs-tool-call-body"><div class="rs-sandbox-content"><pre class="rs-sandbox-output">2 checks passed</pre></div></div></details>