John KuehJohn Kueh

code block icon

Phosphor · code-block · MIT

Download SVG

The Phosphor code block icon visually represents a block of code, commonly used in UIs to denote areas for code input, display, or related programming actions.

Common uses

  • Button to insert code snippet
  • Label for a code editor component
  • Indicator for syntax highlighting settings

Use it in React

Install
npm i @phosphor-icons/react
Import & render
import { CodeBlock } from '@phosphor-icons/react';

<CodeBlock size={24} />

Styles

Phosphor ships this icon in 6 styles — each its own import:

regular
<CodeBlock size={24} />
thin
<CodeBlock size={24} weight="thin" />
light
<CodeBlock size={24} weight="light" />
bold
<CodeBlock size={24} weight="bold" />
fill
<CodeBlock size={24} weight="fill" />
duotone
<CodeBlock size={24} weight="duotone" />

Details

Library
Phosphor (1,512 icons)
License
MIT
viewBox
0 0 256 256
Category
technology & development
Keywords
angle bracketsangle bracessnippetstechnology & developmenteditorcodeblocksnippet

FAQ

What is the code block icon used for?
It signifies code or programming-related content. Use it for buttons, labels, or indicators related to code editing or display.
How do I use the code block icon in React?
Import it using `import { CodeBlock } from '@phosphor-icons/react'` and then render it as a component: `<CodeBlock />`.
What is the license for this icon?
The Phosphor icon set, including the code block icon, is available under the MIT license.

Related icons

The same idea in other libraries, and near matches in Phosphor.

Looking for something else? Search Phosphor and 4 more libraries by description →