gentleface

Gentleface › Development › code-block

code-block icon

Code block: code block, insert code block, code snippet, snippet. Drawn on the 16 px grid. Free SVG, PNG and code, MIT licensed.

Code line-round

SVG
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M13.414 12.414C13.219 12.609 12.993 12.758 12.736 12.86C12.5 12.953 12.254 13 12 13L4 13C3.746 13 3.5 12.953 3.264 12.86C3.007 12.758 2.781 12.609 2.586 12.414C2.391 12.219 2.242 11.993 2.14 11.736C2.047 11.5 2 11.254 2 11L2 4C2 3.746 2.047 3.5 2.14 3.264C2.242 3.007 2.391 2.781 2.586 2.586C2.781 2.391 3.007 2.242 3.264 2.14C3.5 2.047 3.746 2 4 2L12 2C12.254 2 12.5 2.047 12.736 2.14C12.993 2.242 13.219 2.391 13.414 2.586C13.609 2.781 13.758 3.007 13.86 3.264C13.953 3.5 14 3.746 14 4L14 11C14 11.254 13.953 11.5 13.86 11.736C13.758 11.993 13.609 12.219 13.414 12.414ZM3.293 11.707C3.488 11.902 3.724 12 4 12L12 12C12.276 12 12.512 11.902 12.707 11.707C12.902 11.512 13 11.276 13 11L13 4C13 3.724 12.902 3.488 12.707 3.293C12.512 3.098 12.276 3 12 3L4 3C3.724 3 3.488 3.098 3.293 3.293C3.098 3.488 3 3.724 3 4L3 11C3 11.276 3.098 11.512 3.293 11.707ZM7.003 9.5C7.003 9.636 6.953 9.754 6.854 9.854C6.756 9.951 6.638 10 6.5 10C6.362 10 6.244 9.951 6.146 9.854L5.146 8.854C4.974 8.681 4.84 8.484 4.743 8.26C4.638 8.018 4.586 7.764 4.586 7.5C4.586 7.236 4.638 6.982 4.743 6.74C4.84 6.516 4.974 6.319 5.146 6.146L6.146 5.146C6.246 5.047 6.364 4.997 6.5 4.997C6.636 4.997 6.754 5.047 6.854 5.146C6.953 5.246 7.003 5.364 7.003 5.5C7.003 5.636 6.953 5.754 6.854 5.854L5.854 6.854C5.675 7.032 5.586 7.248 5.586 7.5C5.586 7.752 5.675 7.968 5.854 8.146L6.854 9.146C6.953 9.246 7.003 9.364 7.003 9.5ZM11.257 6.74C11.362 6.982 11.414 7.236 11.414 7.5C11.414 7.764 11.362 8.018 11.257 8.26C11.16 8.484 11.026 8.681 10.854 8.854L9.854 9.854C9.754 9.953 9.636 10.003 9.5 10.003C9.364 10.003 9.246 9.953 9.146 9.854C9.047 9.754 8.997 9.636 8.997 9.5C8.997 9.364 9.047 9.246 9.146 9.146L10.146 8.146C10.325 7.968 10.414 7.752 10.414 7.5C10.414 7.248 10.325 7.032 10.146 6.854L9.146 5.854C9.049 5.756 9 5.638 9 5.5C9 5.362 9.049 5.244 9.146 5.146C9.246 5.047 9.364 4.997 9.5 4.997C9.636 4.997 9.754 5.047 9.854 5.146L10.854 6.146C11.026 6.319 11.16 6.516 11.257 6.74Z"/></svg>
React
// Gentleface "code-block" (line-round), MIT. https://gentleface.com/icons/code-block
import type { SVGProps } from 'react';

export function CodeBlockIcon(props: SVGProps<SVGSVGElement>) {
  return (
    <svg xmlns="http://www.w3.org/2000/svg" width={16} height={16} viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" {...props}>
      <path d="M13.414 12.414C13.219 12.609 12.993 12.758 12.736 12.86C12.5 12.953 12.254 13 12 13L4 13C3.746 13 3.5 12.953 3.264 12.86C3.007 12.758 2.781 12.609 2.586 12.414C2.391 12.219 2.242 11.993 2.14 11.736C2.047 11.5 2 11.254 2 11L2 4C2 3.746 2.047 3.5 2.14 3.264C2.242 3.007 2.391 2.781 2.586 2.586C2.781 2.391 3.007 2.242 3.264 2.14C3.5 2.047 3.746 2 4 2L12 2C12.254 2 12.5 2.047 12.736 2.14C12.993 2.242 13.219 2.391 13.414 2.586C13.609 2.781 13.758 3.007 13.86 3.264C13.953 3.5 14 3.746 14 4L14 11C14 11.254 13.953 11.5 13.86 11.736C13.758 11.993 13.609 12.219 13.414 12.414ZM3.293 11.707C3.488 11.902 3.724 12 4 12L12 12C12.276 12 12.512 11.902 12.707 11.707C12.902 11.512 13 11.276 13 11L13 4C13 3.724 12.902 3.488 12.707 3.293C12.512 3.098 12.276 3 12 3L4 3C3.724 3 3.488 3.098 3.293 3.293C3.098 3.488 3 3.724 3 4L3 11C3 11.276 3.098 11.512 3.293 11.707ZM7.003 9.5C7.003 9.636 6.953 9.754 6.854 9.854C6.756 9.951 6.638 10 6.5 10C6.362 10 6.244 9.951 6.146 9.854L5.146 8.854C4.974 8.681 4.84 8.484 4.743 8.26C4.638 8.018 4.586 7.764 4.586 7.5C4.586 7.236 4.638 6.982 4.743 6.74C4.84 6.516 4.974 6.319 5.146 6.146L6.146 5.146C6.246 5.047 6.364 4.997 6.5 4.997C6.636 4.997 6.754 5.047 6.854 5.146C6.953 5.246 7.003 5.364 7.003 5.5C7.003 5.636 6.953 5.754 6.854 5.854L5.854 6.854C5.675 7.032 5.586 7.248 5.586 7.5C5.586 7.752 5.675 7.968 5.854 8.146L6.854 9.146C6.953 9.246 7.003 9.364 7.003 9.5ZM11.257 6.74C11.362 6.982 11.414 7.236 11.414 7.5C11.414 7.764 11.362 8.018 11.257 8.26C11.16 8.484 11.026 8.681 10.854 8.854L9.854 9.854C9.754 9.953 9.636 10.003 9.5 10.003C9.364 10.003 9.246 9.953 9.146 9.854C9.047 9.754 8.997 9.636 8.997 9.5C8.997 9.364 9.047 9.246 9.146 9.146L10.146 8.146C10.325 7.968 10.414 7.752 10.414 7.5C10.414 7.248 10.325 7.032 10.146 6.854L9.146 5.854C9.049 5.756 9 5.638 9 5.5C9 5.362 9.049 5.244 9.146 5.146C9.246 5.047 9.364 4.997 9.5 4.997C9.636 4.997 9.754 5.047 9.854 5.146L10.854 6.146C11.026 6.319 11.16 6.516 11.257 6.74Z" />
    </svg>
  );
}
Vue
Vue: see /icons/code-block.md
Svelte
Svelte: see /icons/code-block.md
HTML img
HTML img: see /icons/code-block.md
CSS
CSS: see /icons/code-block.md
Data URL
Data URL: see /icons/code-block.md
Sprite
Sprite: see /icons/code-block.md
SwiftUI
SwiftUI: see /icons/code-block.md
Compose
Compose: see /icons/code-block.md
Android XML
Android XML: see /icons/code-block.md
Flutter
Flutter: see /icons/code-block.md

Each SVG is 16 × 16 with fill="currentColor". Keep it at 16 px or an exact multiple (32, 48) on whole pixels: a fractional size or position blurs it. The snippets are decorative (aria-hidden). For an icon that carries meaning on its own, such as an icon-only button, label the button, or give the SVG role="img" and an aria-label. More in how to use.

Meaning

Use it for
code block, insert code block, code snippet, snippet
Alternatives
  • code: inline code or code in general (code)
Also fits
  • code: a code block in a document (code-block)
Tags
code, code-block, snippet, pre, source, markup, editor, developer
Category
Development
Component name
CodeBlockIcon
History
  • added

Family 12

More development icons

For agents

Metadata: /icons/code-block.json · Markdown: /icons/code-block.md · SVG: https://gentleface.com/svg/{style}/16/code-block.svg · PNG: https://gentleface.com/png/{style}/{16|32|48}/code-block.png

Feedback