Gentleface › Development › code
code icon
codeCode: code, source code, markup, embed. Drawn on the 16 px grid. Free SVG, PNG and code, MIT licensed. Part of the free toolbar icon set.
Animated code-push · line-round
The slash stands upright and the brackets close in on it. The slash then falls over to a low angle and shoves them apart past their places, and everything settles.
Native SVG animation, with no CSS or script. It loops by itself. Inline it to take the text color: in an <img> it draws black. To play it once on hover or click, run 0.2 s to 1.9 s. Examples and helper.
Code line-round
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true"><path d="M5.947 12.724C5.885 12.847 5.789 12.931 5.658 12.974C5.527 13.018 5.4 13.009 5.276 12.947C5.15 12.884 5.066 12.788 5.023 12.659C4.98 12.53 4.99 12.402 5.053 12.276L10.053 2.276C10.116 2.15 10.212 2.066 10.341 2.023C10.47 1.98 10.598 1.99 10.724 2.053C10.85 2.116 10.934 2.212 10.977 2.341C11.02 2.47 11.01 2.598 10.947 2.724L5.947 12.724ZM2.207 7.5L4.854 10.146C4.953 10.246 5.003 10.364 5.003 10.5C5.003 10.636 4.953 10.754 4.854 10.854C4.756 10.951 4.638 11 4.5 11C4.362 11 4.244 10.951 4.146 10.854L1.146 7.854C1.049 7.756 1 7.638 1 7.5C1 7.362 1.049 7.244 1.146 7.146L4.146 4.146C4.246 4.047 4.364 3.997 4.5 3.997C4.636 3.997 4.754 4.047 4.854 4.146C4.953 4.246 5.003 4.364 5.003 4.5C5.003 4.636 4.953 4.754 4.854 4.854L2.207 7.5ZM11.5 11.003C11.364 11.003 11.246 10.953 11.146 10.854C11.047 10.754 10.997 10.636 10.997 10.5C10.997 10.364 11.047 10.246 11.146 10.146L13.793 7.5L11.146 4.854C11.049 4.756 11 4.638 11 4.5C11 4.362 11.049 4.244 11.146 4.146C11.246 4.047 11.364 3.997 11.5 3.997C11.636 3.997 11.754 4.047 11.854 4.146L14.854 7.146C14.953 7.246 15.003 7.364 15.003 7.5C15.003 7.636 14.953 7.754 14.854 7.854L11.854 10.854C11.754 10.953 11.636 11.003 11.5 11.003Z"/></svg>
// Gentleface "code" (line-round), MIT. https://gentleface.com/icons/code
import type { SVGProps } from 'react';
export function CodeIcon(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="M5.947 12.724C5.885 12.847 5.789 12.931 5.658 12.974C5.527 13.018 5.4 13.009 5.276 12.947C5.15 12.884 5.066 12.788 5.023 12.659C4.98 12.53 4.99 12.402 5.053 12.276L10.053 2.276C10.116 2.15 10.212 2.066 10.341 2.023C10.47 1.98 10.598 1.99 10.724 2.053C10.85 2.116 10.934 2.212 10.977 2.341C11.02 2.47 11.01 2.598 10.947 2.724L5.947 12.724ZM2.207 7.5L4.854 10.146C4.953 10.246 5.003 10.364 5.003 10.5C5.003 10.636 4.953 10.754 4.854 10.854C4.756 10.951 4.638 11 4.5 11C4.362 11 4.244 10.951 4.146 10.854L1.146 7.854C1.049 7.756 1 7.638 1 7.5C1 7.362 1.049 7.244 1.146 7.146L4.146 4.146C4.246 4.047 4.364 3.997 4.5 3.997C4.636 3.997 4.754 4.047 4.854 4.146C4.953 4.246 5.003 4.364 5.003 4.5C5.003 4.636 4.953 4.754 4.854 4.854L2.207 7.5ZM11.5 11.003C11.364 11.003 11.246 10.953 11.146 10.854C11.047 10.754 10.997 10.636 10.997 10.5C10.997 10.364 11.047 10.246 11.146 10.146L13.793 7.5L11.146 4.854C11.049 4.756 11 4.638 11 4.5C11 4.362 11.049 4.244 11.146 4.146C11.246 4.047 11.364 3.997 11.5 3.997C11.636 3.997 11.754 4.047 11.854 4.146L14.854 7.146C14.953 7.246 15.003 7.364 15.003 7.5C15.003 7.636 14.953 7.754 14.854 7.854L11.854 10.854C11.754 10.953 11.636 11.003 11.5 11.003Z" />
</svg>
);
}Vue: see /icons/code.md
Svelte: see /icons/code.md
HTML img: see /icons/code.md
CSS: see /icons/code.md
Data URL: see /icons/code.md
Sprite: see /icons/code.md
SwiftUI: see /icons/code.md
Compose: see /icons/code.md
Android XML: see /icons/code.md
Flutter: see /icons/code.md
Each icon is drawn on the 16 px grid, and most also on the 20 and 24 px grids (at 24 in three weights: light 1 px, regular 1.5 px, bold 2 px). Show the drawing made for your size, or an exact multiple of it, on whole pixels: 16 for 16 and 32 px, 20 for 20 and 40, 24 for 24 and 48. A size in between or a fractional position blurs it. The code on each icon page is the 16 px drawing, an SVG with fill="currentColor"; the icon page's downloads follow its Grid switch, and npm has the 20 and 24 px drawings too. 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.
With npm: import { CodeIcon } from '@gentleface/react'; (setup).
Meaning
- Use it for
- code, source code, markup, embed, coding, iframe, inline code, embed code
- Alternatives
code-block: a code block in a document (code-block)file-code: a source file (code-file)terminal: a shell or command line (terminal)link: share by URL instead of embedding (hyperlink)
- Also fits
- braces: markup and source code, </> (code)
- code block: inline code or code in general (code)
- terminal: source code (code)
- code file: source code without a file (code)
- function: source code in general (code)
- Tags
- code, html, xml, markup, brackets, angle-brackets, developer, programming, source
- Category
- Development
- Component name
CodeIcon- History
- added
- released in 0.1.0
- 20 px drawn, 24 px drawn
- Since
- version 0.1.0
Family 16
More development icons
api api-gateway api-letters api-off api-sparkle breakpoint breakpoint-conditional breakpoint-log bug bug-check bug-off bug-play bug-plus bug-sync check-x-circle code-coverage · all development icons
For agents
Metadata: /icons/code.json · Markdown: /icons/code.md · SVG: https://gentleface.com/svg/{style}/16/code.svg · PNG: https://gentleface.com/png/{style}/{16|32|48}/code.png