import { Code } from "fmicon-react";
<Code size={24} strokeWidth={1} />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | number | string | 24 | Width and height in pixels |
variant | "linear" | "bold" | … | linear | Any of the 8 styles, plus glass-light for light backgrounds |
color | string | currentColor | Any CSS colour; inherits the text colour by default |
strokeWidth | number | 1.5 | Line weight for linear, twotone, broken and duotone |
...props | SVG attributes | – | className, aria-label, onClick and the rest |
More in Programming
What is the Code Icon?
This code icon draws a terminal prompt, a chevron followed by an underscore cursor, inside a rounded square. It points people to anything technical: a console, a script editor, an embed snippet or developer settings. Use it where the next screen involves typed commands or source code rather than buttons and forms.
The >_ mark copies the prompt you see in a shell window, where the chevron waits for input and the underscore stands in for the blinking cursor. People read it as raw, text based control of a system. That sets it apart from the angle bracket pair </>, which suggests markup and source files, and from the command key symbol, which is about keyboard shortcuts rather than a shell.
When to Use the Code Icon
- Developer dashboard: labels the API console tab where engineers test requests and read raw responses.
- Hosting control panel: opens a browser based shell for the server so admins can run commands without a separate SSH client.
- Blog editor toolbar: inserts a formatted code block for snippets, keeping monospaced text separate from paragraphs.
- App settings page: marks a hidden advanced section with debug logs, feature flags and experimental options.
The Code Icon in Linear Style
Linear icons are drawn with a single even stroke and no fills, so they stay light next to body text. You can change the stroke weight from thin to bold without the shape falling apart.
Best for: toolbars, tab bars, settings lists and anything that sits beside text.
The same icon also comes in outline, bold, bulk, twotone, broken, glass and duotone. See every icon in this look on the free linear icons page.
How to Use the Code Icon
- Customise it. Pick a stroke weight, size and colour on the left. Thin (1 px) looks best at large sizes, Regular (1.5 px) is the default.
- Copy or download. Copy the SVG, or download SVG, PNG or WebP at any size from 16 to 512 px.
- Drop it into code. Choose React, React Native, Vue, Svelte, Angular or Flutter above and copy the ready-made
CodeIconcomponent. - Label it. If the icon is the only thing in a button, give it a name for screen readers:
aria-label="Open terminal". If text sits next to it, usearia-hidden="true"instead.
Design Tips for the Code Icon
- Keep the underscore shorter than the chevron is wide, otherwise at 16 px the glyph reads as a play arrow followed by a dash.
- Pair it with a text label like Console or Terminal in navigation, because non-technical users rarely recognise the prompt symbol on its own.
- On dark editor themes, check that the rounded square outline keeps at least 3:1 contrast against the panel colour behind it.
Icons That Work Well with Code
Browse all programming iconsCode Icon FAQ
It stands for a text based command window, where you type instructions instead of clicking. The chevron is the prompt and the underscore is the cursor. Apps use it to open a console, a shell on a remote server or a panel showing logs and command output.
A prompt symbol or a pair of angle brackets both work as a developer icon, so pick by content. The prompt suits pages about running commands, command line tools and servers, while angle brackets suit pages about markup, components or embedding snippets into a site.
Yes. The code icon is one of 891 free, open-source icons you can use in personal and commercial work, including client projects and apps you sell. The packages are MIT licensed; keep the licence notice if you redistribute the icon files.
SVG, PNG and WebP, at any size from 16 to 512 pixels. You can also copy it as JSX or as a ready-made component for React, React Native, Vue, Svelte, Angular and Flutter, with your stroke weight and colour already applied.