Skip to main content

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

Secure .gov websites use HTTPS
A lock () or https:// means you've safely connected to the .gov website. Share sensitive information only on official, secure websites.

Alert

Call out information the reader needs before they carry on.

Usage

{{< alert type="warning" title="Check your version" >}}
Body copy, written as **markdown**.
{{< /alert >}}

Check your version

Body copy, written as markdown.

Parameters

ParameterValuesDefault
typeinfo, warning, error, success, emergencyinfo
titleany textnone
slimtruefalse
no_icontruefalse

When to use which

Reach for slim only when the message is one short line — the variant has no heading slot and halves the padding, so a wrapped paragraph looks unbalanced in it.

Leave role unset on a page that renders the alert at build time. Setting role="alert" makes a screen reader interrupt whatever it was reading the moment the page loads, which is right for something injected after a user action and wrong for static copy.

example.gov

official website of the Example Parent Agency

Looking for U.S. government information and services?
Visit USA.gov