BASE COMPONENTS

Code Block

A versatile container for displaying code, commands, and technical snippets. Code Block offers 4 layout styles, syntax highlighting, copy-to-clipboard, and package manager tabs, ready in Figma and React.

Last Update:
JUN 01, 2026
Code Block
Ayla Karagöz
Diego Fernández
Dimitri Volkov
Erik Lindqvist
Fatou Diallo
Haruki Mori
Jae Park

Loved by 2,000+ users worldwide.

Overview

Code Block is a versatile container for displaying code, commands, and technical snippets across the interface. Its 4 layout styles cover everything from full IDE-like previews to single-line minimal embeds, with built-in syntax highlighting, copy-to-clipboard, and package manager tabs for terminal commands.

Figma Preview

Preview in Figma

When should you use them?

Use a code block whenever you display code, a command, or a technical snippet that users might read, copy, or run, like documentation examples, install commands, or configuration. Pick the layout for the context: Full for rich examples, Terminal for commands, Minimal for inline snippets.

How should you use them?

  • Use the layout for the context: Full for documentation examples, Terminal for commands, Minimal for short inline snippets.
  • Set the correct language so syntax highlighting is accurate and readable.
  • Use the Terminal layout with package manager tabs for install commands, so users copy the right one.
  • Keep copy-to-clipboard available and confirm success so users know the snippet was captured.
  • Use the Preview / Code toggle for live component examples in documentation.
  • Keep syntax colors high-contrast and the code selectable, so it's readable and accessible.
FAQ

Questions,
answered clearly.

Plans, pricing, licensing, updates, and technical questions, all answered in one place.

Still have questions?

Visit ourHelp Centerfor detailed guidance, orGet in Touchwith our team
Çağla
Hakan
Batuhan
Atakan
Çağatay
for product,licensing ortechnical questions.

Your current plan is a one-time payment, no subscriptions, no recurring charges for what you buy today. Some future Create UI products (such as AI-powered features) may be offered as optional add-on subscriptions, but these are entirely separate and will never affect your existing purchase. What you buy now, you own permanently.

Start with Create UI

Stop deciding. Start shipping.

Install it today and your next screen takes an hour instead of a day. Keep rebuilding from scratch, and next quarter looks exactly like this one.

Start Free Now. Upgrade whenever you need.

Create UI