With Code Preview
A hero pairing a headline and CTA with a syntax highlighted code snippet. Speaks directly to developers at the top of a tool or library landing page.
A hero pairing a headline and CTA with a syntax highlighted code snippet. Speaks directly to developers at the top of a tool or library landing page.
Search blocks by description or jump to a page.
With Code Preview is a two-column hero. The left column holds a small outline badge, a bold headline, a short paragraph of supporting copy, and two action buttons stacked in a row. Below those buttons sits an inline code snippet in a muted rounded panel showing a quick install command. The right column contains a terminal window card with a macOS-style traffic-light header, a sequence of shell commands, and their output lines. A smaller floating code card is anchored to the lower-right corner of that terminal, showing a short component import and usage snippet.
The two columns, the badge text, the headline, the supporting copy, and the button labels are all independent. You can swap the install command in the inline panel, rewrite the terminal steps, and replace the floating code card with a different file without touching layout or spacing. Both cards share the same card and muted surface tokens, so the colour scheme updates automatically with the site theme.
Reach for this block when your product is a tool, library, or SDK that developers set up from a terminal. The terminal window and floating code card immediately signal that the product is code-first, which earns trust faster than a screenshot would. For a project management workspace that exposes an API or CLI, this layout lets you show the setup flow right at the top of the page without any extra scrolling.
A natural flow around it on a Marketing (Legacy) page:
Before
After
The block has two distinct visual zones you can adapt independently:
Tip: keep the terminal output to four or five lines so the two cards sit comfortably side by side without the layout growing too tall on mobile.