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 {CodeBlock} from '@/components/ui/astryx-code-block';
const code = `{
"name": "@astryxdesign/core",
"version": "0.0.5",
"dependencies": {
"@astryxdesign/theme-neutral": "^0.1.0",
"react": "^19.0.0"
},
"scripts": {
"build": "tsup",
"test": "vitest"
}
}`;
function CodeBlockJSONConfig() {
return (
<CodeBlock
code={code}
language="json"
title="package.json"
hasLineNumbers
/>
);
}
export default function CodeBlockJSONConfigDemo() {
return (
<div
data-astryx-theme="neutral"
data-theme="light"
style={{colorScheme: 'light', display: 'contents'}}>
<CodeBlockJSONConfig />
</div>
);
}






