gentleface

Gentleface › Actions › x

x icon

X: close, dismiss, cancel. 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="M11.5 2.997C11.636 2.997 11.754 3.047 11.854 3.146C11.951 3.244 12 3.362 12 3.5C12 3.638 11.951 3.756 11.854 3.854L8.207 7.5L11.854 11.146C11.953 11.246 12.003 11.364 12.003 11.5C12.003 11.636 11.953 11.754 11.854 11.854C11.754 11.953 11.636 12.003 11.5 12.003C11.364 12.003 11.246 11.953 11.146 11.854L7.5 8.207L3.854 11.854C3.756 11.951 3.638 12 3.5 12C3.362 12 3.244 11.951 3.146 11.854C3.047 11.754 2.997 11.636 2.997 11.5C2.997 11.364 3.047 11.246 3.146 11.146L6.793 7.5L3.146 3.854C3.047 3.754 2.997 3.636 2.997 3.5C2.997 3.364 3.047 3.246 3.146 3.146C3.246 3.047 3.364 2.997 3.5 2.997C3.636 2.997 3.754 3.047 3.854 3.146L7.5 6.793L11.146 3.146C11.246 3.047 11.364 2.997 11.5 2.997Z"/></svg>
React
// Gentleface "x" (line-round), MIT. https://gentleface.com/icons/x
import type { SVGProps } from 'react';

export function XIcon(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="M11.5 2.997C11.636 2.997 11.754 3.047 11.854 3.146C11.951 3.244 12 3.362 12 3.5C12 3.638 11.951 3.756 11.854 3.854L8.207 7.5L11.854 11.146C11.953 11.246 12.003 11.364 12.003 11.5C12.003 11.636 11.953 11.754 11.854 11.854C11.754 11.953 11.636 12.003 11.5 12.003C11.364 12.003 11.246 11.953 11.146 11.854L7.5 8.207L3.854 11.854C3.756 11.951 3.638 12 3.5 12C3.362 12 3.244 11.951 3.146 11.854C3.047 11.754 2.997 11.636 2.997 11.5C2.997 11.364 3.047 11.246 3.146 11.146L6.793 7.5L3.146 3.854C3.047 3.754 2.997 3.636 2.997 3.5C2.997 3.364 3.047 3.246 3.146 3.146C3.246 3.047 3.364 2.997 3.5 2.997C3.636 2.997 3.754 3.047 3.854 3.146L7.5 6.793L11.146 3.146C11.246 3.047 11.364 2.997 11.5 2.997Z" />
    </svg>
  );
}
Vue
Vue: see /icons/x.md
Svelte
Svelte: see /icons/x.md
HTML img
HTML img: see /icons/x.md
CSS
CSS: see /icons/x.md
Data URL
Data URL: see /icons/x.md
Sprite
Sprite: see /icons/x.md
SwiftUI
SwiftUI: see /icons/x.md
Compose
Compose: see /icons/x.md
Android XML
Android XML: see /icons/x.md
Flutter
Flutter: see /icons/x.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
close, dismiss, cancel
Alternatives
  • x-circle: a clear or cancel button that stands alone, e.g. inside a field
  • stop-circle: stop a running process or generation
Don’t confuse with
  • trash: the trash motif does not mean dismiss
Also fits
  • clear filter: remove one filter chip inside a filter bar
  • delete: remove from a list or dismiss without deleting the data
  • close menu: dismiss a menu or a dialog entirely (close)
  • clean up: clear a field, a list or a selection
  • clear: close or dismiss a panel or dialog
  • reject: a bare × beside an accept check, e.g. in track changes
  • exit: close a dialog, panel or tab
Not for
  • multiply (use multiply): × as a close glyph means dismiss (close); multiply is drawn at operator size
  • error (use alert-circle): the x motif means close or dismiss, not error
Tags
close, times, cross
Category
Actions
Component name
XIcon
History
  • added
  • 20 px drawn, 24 px drawn

More actions icons

For agents

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

Feedback