Get StartedComponentsStylingThemingMath & Science
MCP

Basics

Code Block

Code with built-in syntax highlighting (no Shiki), line numbers and copy button.

Markdown

Import

tsx
import { CodeBlock } from "@indoku/ui"

Examples

Basic usage

app.tsx
import { Button } from "@indoku/ui"​// Komponen sederhanaexport function App() {  const count = 3  return <Button variant="outline">Klik {count}</Button>}
{ "name": "@indoku/ui", "private": false, "version": "0.1.0" }

Props

Root

PropTypeDefaultDescription
code*string–
languagestring–
titleReact.ReactNode–
showLineNumbersboolean–
highlightLinesnumber[]–Line numbers (1-based) to highlight.
addedLinesnumber[]–
removedLinesnumber[]–
wrapboolean–
maxLinesnumber–Limit the initial height; the rest can be revealed with a button.
copyablebooleantrueShow the copy button.

* required. Style props and HTML attributes are accepted as well.

Created by @indokudev