Dev Tools
CodeBlock
Displays a code snippet with optional title bar showing the file name and language label.
Import
import CodeBlock from '../../components/utility/CodeBlock.astro'; Props
| Prop | Type | Required | Description |
|---|---|---|---|
code | string | Yes | The code string to display |
language | string | No | Language label shown in header (default: "css") |
title | string | No | File name or title shown in header bar |
Preview
global.css css
--color-content-primary: var(--primitive-light-cool-grey-900);
--color-content-secondary: var(--primitive-light-cool-grey-alpha-600);