- Icon Monks
- Editor icons
- 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.
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
pencil-code
brackets-curly
brackets-square
function
align-box-bottom-center
align-box-bottom-left
align-box-bottom-right
align-box-center-bottom
align-box-center-middle
align-box-center-stretch
align-box-center-top
align-box-left-bottom
align-box-left-middle
align-box-left-stretch
align-box-left-top
align-box-right-bottom
align-box-right-middle
align-box-right-stretch
Similar icons in other categories
cursor-code
flag-code
funnel-code
gear-code
globe-code
heart-code
image-code
lock-code
magnifying-glass-code
map-pin-code
map-trifold-code
music-note-code
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