Skip to content

shadcn.io is an independent project built on shadcn/ui

Free

Info with Title Alert for Solid

An info alert that shows only the word Info. No icon, no description, and no button, for a notice that already fits on one line.

UI library: Ark UI

A single title, Info, on an info-tinted alert. No icon, no description, and no button.

Use it for an FYI that fits in one line, such as a scheduled update. If it should disappear, prefer Sonner. In Solid, Ark UI keeps showing it until you stop.

Preview

Preview width

Installation

MCP · Pro
Make your AI a shadcn expert
Your agent installs components, builds pages and restyles your app from one prompt, in Claude Code, Cursor or VS Code.
Part of Pro

Anatomy

Alert anatomy: root, icon, title, description, action

Usage

<Alert class="max-w-lg" variant="info">
    <AlertTitle>Info</AlertTitle>
  </Alert>

FAQ

When should I use a title-only info alert?

When the title is the whole message. This demo is variant="info" with a single AlertTitle and nothing else. Add AlertDescription when the reader still needs what the notice means.

When should I use info alerts vs warning alerts?

Info is for something worth knowing that carries no risk: a new feature, a beta label, a scheduled change. Warning is for something that may cause a problem if ignored, such as an expiring plan. If nothing bad happens when the reader skips it, it's info.

Where do the blue tint and border come from?

From variant="info": it gives the alert a faint tint of the theme's --info color, a stronger border in the same color, and colors any icon. The title keeps the regular text color, so it stays easy to read in light and dark mode.

Should info alerts be dismissible?

Often, yes: information the reader has seen can go. The Alert has no built-in close button, so keep whether it's shown in your own state and put a Dismiss button in AlertAction.

What else is set on this alert?

className="max-w-lg" caps the width. The title text is Info, in an AlertTitle, which is font-medium. There is no icon, so the alert does not add an icon column.

Are info alerts accessible to screen readers?

Alert renders with role="alert", which interrupts the reader to announce it. That's too urgent for most information: pass role="status" for a polite announcement, or remove the role when the alert is on the page from the start.

API Reference

Alert

Sets variant="info". The rest is on the Alert page.