CodeBlock
Highlighted code on a well in Kaeso's monochrome theme: copy on hover, tabs, line numbers, collapse.
<div className="w-full">
<CodeBlock tabs={sdkSnippets({ baseUrl: "https://gateway.northwind.example" })} />
</div>import { CodeBlock } from "@logicplanes/kaeso-ui";Props
codestringThe code to show.
collapseAfternumber = 24Collapse beyond this many lines (24 by default; 0 never collapses).
copyboolean = trueHide the copy circle.
highlightLinesnumber[] = []1-based line numbers to highlight.
langCodeLang = tsThe language of the code, for highlighting.
lineNumbersbooleanShows line numbers.
surface"well" | "plain" = wellOn a filled well (
well) or on the panel itself (plain).tabsCodeTab[]Several versions: "Python · Node · curl", shown as pill tabs.
titleReactNodeA file name in the title bar.
wrapboolean = falseLong lines wrap instead of scrolling sideways: code in a narrow column (a model's response).