Forma icon · Status

Warning

An exclamation mark in a triangle: caution, attention needed or a recoverable problem.

Name
warning
Category
Status
Introduced
Forma 0.5.0
Keywords
caution, attention
Grid
24 × 24, 1.8 stroke, round caps and joins
Origin
Original Forma artwork
Construction view: the warning glyph on the 24-unit grid. The dashed square marks the one-unit safe margin that strokes stay inside.

Meaning and when to use it

An exclamation mark in a triangle: caution, attention needed or a recoverable problem.

Use it for

  • Warnings and validation problems, always with text naming the issue.
  • Items that need review.

Avoid it for

  • Successful states; use success.
  • Notifications in general; use bell.

Sizes

The default size is 1.25em, so the icon follows the surrounding text. These are the reviewed sizes; geometry keeps a one-unit safe margin at every size.

HTML · Set a size
<forma-icon class="forma-component-tag"><span class="forma-icon" style="--forma-icon-size:32px" data-forma-icon="warning"><svg xmlns="http://www.w3.org/2000/svg" class="forma-icon__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10.1 4.8Q12 1.9 13.9 4.8L21 17.6Q22.5 20 19.6 20H4.4Q1.5 20 3 17.6Z"/><path d="M12 9V13.7"/><circle cx="12" cy="17" r="0.65"/></svg></span></forma-icon>

Click or tap the code once to select all of it, then copy.

Colour and contrast modes

The icon has no colour of its own: its stroke is currentColor. These swatches set only the parent’s colour role. Brands and themes change the ink through the same roles.

Forced colours and high contrast

In Windows high-contrast and other forced-colour modes the icon is drawn in the system text colour (CanvasText), or the button text colour inside buttons. Meaning must therefore never depend on the icon’s colour.

Grayscale and print

The ink is a vector stroke, not a background, so it prints when browsers drop backgrounds and stays legible in grayscale. Status is always carried by the words next to the icon.

Configurations and how to use them

Every configuration below uses the same generated snippet. Only the surrounding HTML changes. Copy the example that matches your context.

Configuration

Button with a visible text label

The preferred configuration. The icon is decorative and the visible text names the control, so nothing else is needed.

HTML · Button with a visible text label Raw HTML for HTML · Button with a visible text label
<button type="button"><forma-icon class="forma-component-tag"><span class="forma-icon" data-forma-icon="warning"><svg xmlns="http://www.w3.org/2000/svg" class="forma-icon__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10.1 4.8Q12 1.9 13.9 4.8L21 17.6Q22.5 20 19.6 20H4.4Q1.5 20 3 17.6Z"/><path d="M12 9V13.7"/><circle cx="12" cy="17" r="0.65"/></svg></span></forma-icon> Show warnings</button>

Click or tap the code once to select all of it, then copy.

Configuration

Icon-only button

When space only allows the glyph, the button itself must carry the accessible name with aria-label. The SVG stays aria-hidden and the button keeps a touch target of about 44 by 44 CSS pixels.

HTML · Icon-only button Raw HTML for HTML · Icon-only button
<button type="button" aria-label="Show warnings" style="min-inline-size:2.75rem;min-block-size:2.75rem"><forma-icon class="forma-component-tag"><span class="forma-icon" data-forma-icon="warning"><svg xmlns="http://www.w3.org/2000/svg" class="forma-icon__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10.1 4.8Q12 1.9 13.9 4.8L21 17.6Q22.5 20 19.6 20H4.4Q1.5 20 3 17.6Z"/><path d="M12 9V13.7"/><circle cx="12" cy="17" r="0.65"/></svg></span></forma-icon></button>

Click or tap the code once to select all of it, then copy.

Configuration

Inline with status or body text

Placed before words, the icon repeats meaning the text already states. It scales with the surrounding font size because the default size is 1.25em.

Show warnings

HTML · Inline with status or body text Raw HTML for HTML · Inline with status or body text
<p><forma-icon class="forma-component-tag"><span class="forma-icon" data-forma-icon="warning"><svg xmlns="http://www.w3.org/2000/svg" class="forma-icon__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10.1 4.8Q12 1.9 13.9 4.8L21 17.6Q22.5 20 19.6 20H4.4Q1.5 20 3 17.6Z"/><path d="M12 9V13.7"/><circle cx="12" cy="17" r="0.65"/></svg></span></forma-icon> Show warnings</p>

Click or tap the code once to select all of it, then copy.

Configuration

Custom size

Set --forma-icon-size on the presentation span or any ancestor. Keep icons at 16px or larger.

2rem icon

HTML · Custom size Raw HTML for HTML · Custom size
<p style="--forma-icon-size:2rem"><forma-icon class="forma-component-tag"><span class="forma-icon" data-forma-icon="warning"><svg xmlns="http://www.w3.org/2000/svg" class="forma-icon__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10.1 4.8Q12 1.9 13.9 4.8L21 17.6Q22.5 20 19.6 20H4.4Q1.5 20 3 17.6Z"/><path d="M12 9V13.7"/><circle cx="12" cy="17" r="0.65"/></svg></span></forma-icon> 2rem icon</p>

Click or tap the code once to select all of it, then copy.

Configuration

Custom colour

The stroke is currentColor, so the parent’s colour role decides the ink. Never rewrite the SVG geometry or stroke to recolour it.

Accent ink, primary text

HTML · Custom colour Raw HTML for HTML · Custom colour
<p style="color:var(--forma-color-accent-primary)"><forma-icon class="forma-component-tag"><span class="forma-icon" data-forma-icon="warning"><svg xmlns="http://www.w3.org/2000/svg" class="forma-icon__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10.1 4.8Q12 1.9 13.9 4.8L21 17.6Q22.5 20 19.6 20H4.4Q1.5 20 3 17.6Z"/><path d="M12 9V13.7"/><circle cx="12" cy="17" r="0.65"/></svg></span></forma-icon> <span style="color:var(--forma-color-text-primary)">Accent ink, primary text</span></p>

Click or tap the code once to select all of it, then copy.

Configuration

Standalone meaningful image

Use the static SVG file with alt text when the icon stands alone and carries meaning, for example in a table cell with no other text.

Warning
HTML · Standalone meaningful image Raw HTML for HTML · Standalone meaningful image
<img src="warning.svg" alt="Warning" width="24" height="24">

Click or tap the code once to select all of it, then copy.

Configuration

Decorative image

When nearby text already says the same thing, give the image an empty alt so assistive technology skips it.

Warning

HTML · Decorative image Raw HTML for HTML · Decorative image
<p><img src="warning.svg" alt="" width="20" height="20"> Warning</p>

Click or tap the code once to select all of it, then copy.

Files and package paths

Copy the generated assets from the pinned package. Do not hand-copy path geometry: the compiled files are deterministic and verified against the digest below.

Warning assets in Forma 1.0.2
AssetPackage pathUse
Static SVG@echelon-foundry/design-system/icons/warning.svg<img>, CSS, print and offline documents
Decorative HTML@echelon-foundry/design-system/icons/html/warning.htmlInline markup inside a named control or next to text
Registry entry@echelon-foundry/design-system/icons/registry.jsonName, label, category, keywords and digest for tools

Download warning.svg · Decorative HTML as text

SVG · warning.svg
<svg xmlns="http://www.w3.org/2000/svg" class="forma-icon__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M10.1 4.8Q12 1.9 13.9 4.8L21 17.6Q22.5 20 19.6 20H4.4Q1.5 20 3 17.6Z"/><path d="M12 9V13.7"/><circle cx="12" cy="17" r="0.65"/></svg>

Click or tap the code once to select all of it, then copy.

HTML · icons/html/warning.html
<forma-icon class="forma-component-tag"><span class="forma-icon" data-forma-icon="warning"><svg xmlns="http://www.w3.org/2000/svg" class="forma-icon__svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10.1 4.8Q12 1.9 13.9 4.8L21 17.6Q22.5 20 19.6 20H4.4Q1.5 20 3 17.6Z"/><path d="M12 9V13.7"/><circle cx="12" cy="17" r="0.65"/></svg></span></forma-icon>

Click or tap the code once to select all of it, then copy.

Forma version
1.0.2
SVG sha256
6e8965ab2966f8586e00ea474a74c15c2e80e5fa808f22882409845ac73b1de7

Accessibility checklist