Code Square Icon

code-square · Networking It Programming · 6 styles

Solar Icons catalogues Code Square under Networking It Programming. It is one of 31 glyphs in that category and one of 1,246 icons in the library overall, each drawn on the same 24x24 grid so Code Square lines up optically with everything around it. The icon is addressed in templates by the string "code-square", and every style variant resolves from that single name.

Semantically the glyph carries source code and a square container that gives the glyph a consistent bounding box. That places Code Square in the Networking It Programming family, which covers servers, code, networks and infrastructure and turns up in status pages, deploy logs, API docs and developer consoles. Teams building developer tooling and infrastructure dashboards reach for this set first. Use Code Square where the label alone would be ambiguous — an icon-only button, a dense table row, a mobile tab bar — and keep an accessible name on the control, because the SVG itself is decorative.

Code Square in 6 styles

Code Square comes rendered in 6 style variants: Bold, Bold Duotone, Linear, Outline, Broken and Line Duotone. Bold gives you solid filled shapes that hold their weight at 16px and read clearly against coloured backgrounds. Bold Duotone gives you a filled body with a second, lower-opacity layer that adds depth without a second colour token. Linear gives you even 1.5px strokes, the neutral default for dense interfaces and toolbars. A common pairing is Bold for the selected state and Line Duotone for the rest, so the active item reads without a colour change.

BoldCodeSquareBold
Bold DuotoneCodeSquareBoldDuotone
LinearCodeSquareLinear
OutlineCodeSquareOutline
BrokenCodeSquareBroken
Line DuotoneCodeSquareLineDuotone

How to use the code-square icon in Angular

You register only the variants you actually render, so nothing unused reaches the bundle. Import CodeSquareBold from the "@rchernando/solar-icons/networking-it-programming" entry point, hand it to provideSolarIcons in your application config or in a route-level providers array, and render it with the solar-icon component. All 6 exports for code-square live in that same entry point, so switching style is a one-line change.

typescript
import { CodeSquareBold, CodeSquareBoldDuotone, CodeSquareLinear, CodeSquareOutline, CodeSquareBroken, CodeSquareLineDuotone } from '@rchernando/solar-icons/networking-it-programming';
typescript
import { ApplicationConfig } from '@angular/core';
import { provideSolarIcons } from '@rchernando/solar-icons';
import { CodeSquareBold } from '@rchernando/solar-icons/networking-it-programming';

export const appConfig: ApplicationConfig = {
  providers: [provideSolarIcons(CodeSquareBold)]
};
html
<solar-icon name="code-square" iconStyle="bold" size="24px" />
<solar-icon name="code-square" iconStyle="bold-duotone" size="24px" />
<solar-icon name="code-square" iconStyle="linear" size="24px" />
<solar-icon name="code-square" iconStyle="outline" size="24px" />
<solar-icon name="code-square" iconStyle="broken" size="24px" />
<solar-icon name="code-square" iconStyle="line-duotone" size="24px" />

More Networking It Programming icons

Icons drawn alongside it in Networking It Programming include Wi Fi Router, Station, Programming, Code Circle, Usbsquare, Slash Square, Hashtag Square and Code. They share stroke weight and corner radius with Code Square, so mixing them in one toolbar stays consistent.

Browse all Networking It Programming icons →

Icons related to Code Square

If Code Square is not quite the shape you want, Chat Square Code, Add Square, Bluetooth Square, Bookmark Square and Bookmark Square Minimalistic share part of its name and often work as substitutes.

Elsewhere in the library

Outside this category, Alarm Sleep, Star Rainbow, Radio, Link Round Angle, Double Alt Arrow Down and Body Shape cover neighbouring ideas; the name "code-square" is 11 characters long and splits into 2 tokens, which is how the explorer's search matches it.

Code Square icon FAQ

How do I use the code-square icon in Angular?
Import CodeSquareBold from "@rchernando/solar-icons/networking-it-programming", register it with provideSolarIcons(CodeSquareBold) and render <solar-icon name="code-square" iconStyle="bold" />. No HTTP request is made — the SVG is inlined at build time.
Which styles does Code Square support?
6 of them: Bold, Bold Duotone, Linear, Outline, Broken and Line Duotone. Each is a separate export, so you only ship the ones you import.
Can I change the size and colour of code-square?
Yes. The size input accepts any CSS length and the SVG uses currentColor, so Code Square inherits the text colour of its container — a Tailwind class such as text-violet-400 is enough.

One of 1,246 icons in the Solar Icons explorer. See also the installation guide and the styling reference.