Did you know?dyk.si

Code Block

A dark box with monospaced code, syntax colors and a copy button in the corner.

<pre><code>

When to use it

In documentation and technical articles.

Common mistake

Don’t wrap code lines; let them scroll.

Accessibility

Keep it horizontally scrollable and label the copy button.

Name in code

HTML/CSS<pre><code>
ReactShiki / Prism + copy button
Jetpack ComposeText(fontFamily = Monospace)
SwiftUIText + .monospaced()

Ready prompt for your coding agent

Add a Code Block to this screen. What it is: A dark box with monospaced code, syntax colors and a copy button in the corner. Implement with: <pre><code> (HTML/CSS). Accessibility: Keep it horizontally scrollable and label the copy button. When to use it: In documentation and technical articles. Avoid: Don’t wrap code lines; let them scroll. Reuse the project's existing design tokens, spacing and component conventions.

Or compose a whole page from this element and others →

Prompts are in English for the most precise results with coding agents.