About
Code marks short inline references such as function names, variables, file paths, and command-line flags. Use CodeBlock for standalone or multi-line snippets.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Code to your project and fits it to your theme.
Code
How Astryx Code is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
import {Code} from '@/components/ui/astryx-code';
import {Text} from '@astryxdesign/core/Text';
import {Heading} from '@astryxdesign/core/Text';
import {VStack} from '@astryxdesign/core/Stack';
function CodeAcrossTextSizes() {
return (
<VStack gap={3}>
<Heading level={3}>
Heading with <Code>inline code</Code>
</Heading>
<Text type="body">
Body text with <Code>inline code</Code>
</Text>
<Text type="supporting">
Supporting text with <Code>inline code</Code>
</Text>
<Text type="label">
Label text with <Code>inline code</Code>
</Text>
</VStack>
);
}
export default function CodeAcrossTextSizesDemo() {
return (
<div
data-astryx-theme="neutral"
data-theme="light"
style={{colorScheme: 'light', display: 'contents'}}>
<CodeAcrossTextSizes />
</div>
);
}






