1. Icon Monks
  2. Editor icons
  3. Code Block

Code Block icon

The code block icon is a free editor icon from Icon Monks, drawn as one clean path on a 256-unit grid in six weights. It is free for personal and commercial use under the MIT license.

Code Block icon, thin weight
Thin
SVG
Code Block icon, light weight
Light
SVG
Code Block icon, regular weight
Regular
SVG
Code Block icon, bold weight
Bold
SVG
Code Block icon, fill weight
Fill
SVG
Code Block icon, duotone weight
Duotone
SVG

Open in the icon browserCustomize size and color, then download PNG, WebP or PDF.

About the code block icon

It is a block variant of the code icon, so it keeps the exact outline of the code icon. Use it to stand for code, snippet and embed. The regular weight is a single path made of 4 shapes, and the duotone weight adds a 20% tint behind the outline.

Pairs well with the brackets curly, function and align box bottom center icons, which share the “code” theme. Use the same weight for all of them so they read as one set.

When to use the code block icon

It belongs to the editor set, made for text editing, formatting and writing tools. Pair it with the related icons below so a screen stays in one visual style.

Use the code block icon in your code

React

import { CodeBlock } from '@icon-monks/react';

<CodeBlock size={24} />

Vue

<script setup>
import { CodeBlock } from '@icon-monks/vue';
</script>

<CodeBlock :size="24" />

Web component

<icon-monks name="code-block" size="24"></icon-monks>

Icon font

<i class="im im-code-block"></i>

Flutter

Icon(IconMonks.codeBlock)

SwiftUI

Image(iconMonks: .codeBlock)

Compose

import com.designmonks.icons.IconMonks
import com.designmonks.icons.regular.CodeBlock

Icon(IconMonks.Regular.CodeBlock, contentDescription = null)

Need setup steps? See the getting started guide or the page for React, Flutter, SwiftUI or Jetpack Compose.

Tags

Related editor icons

See all 277 editor icons

Similar icons in other categories

Questions about the code block icon

Is the code block icon free for commercial use?

Yes. The code block icon is released under the MIT license, so you can use it in personal, client and commercial projects without paying or adding credit in your interface.

How do I change the color and size of the code block icon?

The icon draws in currentColor, so it takes the text color around it. In React, Vue and the web component, set the size and color props; in the icon browser, pick a color and size before you download a PNG, WebP, SVG or PDF.

What is the difference between the code block and code icons?

The code block icon is a block variant of the code icon. Both share the same outline and come in all six weights, so you can swap one for the other to show a change of state.

Last updated with version 0.4.3. Release notes