About
Fenced code block with syntax highlighting. Use for multi-line code snippets.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Code Block to your project and fits it to your theme.
Code
How Astryx Code Block is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
import {SyntaxTheme} from '@astryxdesign/core/theme';
import {githubDark} from '@astryxdesign/core/theme/syntax';
import {CodeBlock} from '@/components/ui/astryx-code-block';
const commands = `$ astryx init --features agents
✓ AI agent docs installed → AGENTS.md
$ pnpm astryx component CodeBlock --dense`;
function CodeBlockTerminal() {
return (
<SyntaxTheme theme={githubDark}>
<CodeBlock
code={commands}
language="bash"
hasCopyButton
style={{width: '100%', maxWidth: 480}}
/>
</SyntaxTheme>
);
}
export default function CodeBlockTerminalDemo() {
return (
<div
data-astryx-theme="neutral"
data-theme="light"
style={{colorScheme: 'light', display: 'contents'}}>
<CodeBlockTerminal />
</div>
);
}






