- Docs
- Components
- Data display
Code block
Code to read and copy: a command, a snippet, a JSON event or XML metadata, coloured, with one Copy button.
- Import
- @qeetrix/react/experimental
- Status
- ExperimentalSince 0.0.6
- Renders
<pre>Server-rendered- Tested
- WCAG 2.2 AAaxe on every pull request
01
0.3.0
- Kotlin and Swift: language="kotlin" (Gradle's .kts too) and language="swift", in the same kinds of colour.
02
0.2.0
- Server-safe: highlighted where it renders; only Copy hydrates.
- css is a language; highlight and highlightHtml are exported for static pages.
03
0.1.0
- Wrapped lines keep their indent, and the number column fits three-digit lines.
04
0.0.6
- CodeBlock: code to read and copy, coloured by the code tokens with our own small highlighter (shell, JavaScript and TypeScript with JSX, JSON, XML and HTML). More than one line gets a header with the language and Copy, and CSS line numbers; long lines scroll in a named, keyboard-reachable region, or wrap. Ligatures are off.
Every change to @qeetrix/react
Next — FeedbackAlert