Content
CodeBlock
A dark-themed syntax-highlighted code block with optional streaming mode, line numbers, copy button, and language label.
Preview:1280px
Default
typescript
1const greeting = 'Hello, Stellix!';2console.log(greeting);
2 linesUTF-8
Terminal
Terminal
$npm install @stellix/ui-webadded 42 packages in 3.2s$npm run devready - started server on http://localhost:3000
Multi-File
tsx3 lines
1export default function App() {2return <div>Hello</div>;3}
Diff
11
| 1 | const name = "Stellix"; | |
| 2 | const version = "0.1.0"; | |
| 3 | const version = "0.1.4"; | |
| 4 | export { name, version }; |
4 lines+1-1
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| code | string | - | Source code string to display. |
| language | string | 'typescript' | Language label shown in the header. |
| streaming | boolean | false | Animate lines in one-by-one. |
| showLineNumbers | boolean | true | Toggle line number gutter. |
| onCopy | () => void | - | Callback fired after copy button click. |