gentleface

Gentleface › Development › if-else

if-else icon

If else: conditional, branching logic, if else. 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="M12.42 4.176C12.741 4.303 13.024 4.488 13.268 4.732C13.512 4.976 13.697 5.259 13.824 5.58C13.941 5.875 14 6.182 14 6.5L14 13.5C14 13.641 13.952 13.759 13.856 13.856C13.759 13.952 13.641 14 13.5 14C13.359 14 13.241 13.952 13.144 13.856C13.048 13.759 13 13.641 13 13.5L13 6.5C13 6.309 12.965 6.125 12.895 5.948C12.818 5.755 12.707 5.586 12.561 5.439C12.414 5.293 12.245 5.182 12.052 5.105C11.875 5.035 11.691 5 11.5 5L10.662 5C10.619 5.073 10.565 5.143 10.5 5.207L8.207 7.5C8.012 7.695 7.776 7.793 7.5 7.793C7.224 7.793 6.988 7.695 6.793 7.5L4.5 5.207C4.435 5.142 4.381 5.073 4.338 5L3.5 5C3.309 5 3.125 5.035 2.948 5.105C2.755 5.182 2.586 5.293 2.439 5.439C2.293 5.586 2.182 5.755 2.105 5.948C2.035 6.125 2 6.309 2 6.5L2 13.5C2 13.641 1.952 13.759 1.856 13.856C1.759 13.952 1.641 14 1.5 14C1.359 14 1.241 13.952 1.144 13.856C1.048 13.759 1 13.641 1 13.5L1 6.5C1 6.182 1.059 5.875 1.176 5.58C1.303 5.259 1.488 4.976 1.732 4.732C1.976 4.488 2.259 4.303 2.58 4.176C2.875 4.059 3.182 4 3.5 4L4.338 4C4.381 3.927 4.435 3.858 4.5 3.793L6.793 1.5C6.988 1.305 7.224 1.207 7.5 1.207C7.776 1.207 8.012 1.305 8.207 1.5L10.5 3.793C10.565 3.857 10.619 3.927 10.662 4L11.5 4C11.818 4 12.125 4.059 12.42 4.176ZM5.207 4.5L7.5 6.793L9.793 4.5L7.5 2.207L5.207 4.5Z"/></svg>
React
// Gentleface "if-else" (line-round), MIT. https://gentleface.com/icons/if-else
import type { SVGProps } from 'react';

export function IfElseIcon(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="M12.42 4.176C12.741 4.303 13.024 4.488 13.268 4.732C13.512 4.976 13.697 5.259 13.824 5.58C13.941 5.875 14 6.182 14 6.5L14 13.5C14 13.641 13.952 13.759 13.856 13.856C13.759 13.952 13.641 14 13.5 14C13.359 14 13.241 13.952 13.144 13.856C13.048 13.759 13 13.641 13 13.5L13 6.5C13 6.309 12.965 6.125 12.895 5.948C12.818 5.755 12.707 5.586 12.561 5.439C12.414 5.293 12.245 5.182 12.052 5.105C11.875 5.035 11.691 5 11.5 5L10.662 5C10.619 5.073 10.565 5.143 10.5 5.207L8.207 7.5C8.012 7.695 7.776 7.793 7.5 7.793C7.224 7.793 6.988 7.695 6.793 7.5L4.5 5.207C4.435 5.142 4.381 5.073 4.338 5L3.5 5C3.309 5 3.125 5.035 2.948 5.105C2.755 5.182 2.586 5.293 2.439 5.439C2.293 5.586 2.182 5.755 2.105 5.948C2.035 6.125 2 6.309 2 6.5L2 13.5C2 13.641 1.952 13.759 1.856 13.856C1.759 13.952 1.641 14 1.5 14C1.359 14 1.241 13.952 1.144 13.856C1.048 13.759 1 13.641 1 13.5L1 6.5C1 6.182 1.059 5.875 1.176 5.58C1.303 5.259 1.488 4.976 1.732 4.732C1.976 4.488 2.259 4.303 2.58 4.176C2.875 4.059 3.182 4 3.5 4L4.338 4C4.381 3.927 4.435 3.858 4.5 3.793L6.793 1.5C6.988 1.305 7.224 1.207 7.5 1.207C7.776 1.207 8.012 1.305 8.207 1.5L10.5 3.793C10.565 3.857 10.619 3.927 10.662 4L11.5 4C11.818 4 12.125 4.059 12.42 4.176ZM5.207 4.5L7.5 6.793L9.793 4.5L7.5 2.207L5.207 4.5Z" />
    </svg>
  );
}
Vue
Vue: see /icons/if-else.md
Svelte
Svelte: see /icons/if-else.md
HTML img
HTML img: see /icons/if-else.md
CSS
CSS: see /icons/if-else.md
Data URL
Data URL: see /icons/if-else.md
Sprite
Sprite: see /icons/if-else.md
SwiftUI
SwiftUI: see /icons/if-else.md
Compose
Compose: see /icons/if-else.md
Android XML
Android XML: see /icons/if-else.md
Flutter
Flutter: see /icons/if-else.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.

Meaning

Use it for
conditional, branching logic, if else
Tags
if, else, condition, conditional, branch, logic, decision, flowchart, programming
Category
Development
Component name
IfElseIcon
History
  • 20 px drawn, 24 px drawn, added

More development icons

For agents

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