# Components Alert: Inset Alerts

Alerts with an inset shadow that sinks slightly into the surface. Use for grouped notices inside cards or panels that feel part of the layout.

- Page: https://www.shadcn-ui-blocks.com/blocks/components/alerts/inset-alerts
- Collection: [Components](https://www.shadcn-ui-blocks.com/blocks/components), Free tier
- Group: [Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/components/alerts/inset-alerts.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/components-alerts-inset-alerts
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/components-alerts-inset-alerts.json"`.

## Depends on

- npm packages: class-variance-authority, lucide-react
- shadcn/ui components: alert
- Installs to: `@/components/blocks/components/alerts/inset-alerts`

## About this block

Inset Alerts is a vertical stack of five alert variants, each sharing the
same pressed-in treatment. Every alert carries a title and a short
description. Four of the five add a status icon at the leading edge: a
red X circle for the destructive variant, a green check circle for
success, a yellow triangle for warning, and a blue info circle for the
informational variant. The default alert has no icon. The inset shadow
on each panel creates a recessed look so the notices appear sunken into
the surface rather than raised above it.

Each alert is independent. You can keep any subset of the five, rewrite
the title and description copy, or swap in a different icon without
affecting the others. The five tones cover the common status vocabulary,
so most use cases only need copy changes.

## When to use

Reach for this block when alerts live inside a card, sidebar panel, or
settings section and need to feel like part of the surface rather than
floating on top of it. On an online education platform the pressed look
fits naturally inside a course detail card, a quiz results panel, or an
assignment submission area where the notices belong to the content
around them rather than interrupting it. The inset style is quieter than
elevated or outlined alerts, so it is a good fit when several notices
share a panel and you want them to feel cohesive rather than stacked and
competing.

A natural flow around it on a Components page:

**Before**

- [Basic Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/basic-alerts) to establish
  the simplest alert treatment before introducing the inset variant
- [Cards](https://www.shadcn-ui-blocks.com/blocks/components/cards) when the parent container is a card
  that these alerts will sit inside

**After**

- [Compact Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/compact-alerts) for a
  slimmer alternative when vertical space runs tight
- [Dismissible Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/dismissible-alerts) if
  readers should be able to clear notices once they have been seen

## What you can display

All five tones are ready to use as-is. A few ways to put them to work:

- **Course status notices.** Show a success alert when a lesson is
  marked complete, a warning when a deadline is approaching, and an
  info alert when new course material has been added.
- **Form validation feedback.** Place the destructive variant below a
  field group to surface submission errors, and swap to success once
  the data passes.
- **Panel-level system messages.** Use the default or info variant
  inside a settings panel to surface read-only notices such as billing
  cycle reminders or account tier limits.

> Tip: because the inset shadow reads as part of the surface, these
> alerts pair especially well with a lightly tinted panel background.

## More in Components Alerts

- [Accent Border Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/accent-border-alerts)
- [All Sides Accent Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/all-sides-accent-alerts)
- [Basic Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/basic-alerts)
- [Bottom Accent Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/bottom-accent-alerts)
- [Compact Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/compact-alerts)
- [Dashed Border Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/dashed-border-alerts)
- [Dismissible Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/dismissible-alerts)
- [Dotted Border Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/dotted-border-alerts)
- [Double Border Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/double-border-alerts)
- [Elevated Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/elevated-alerts)
- [Frosted Glass Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/frosted-glass-alerts)
- [Glow Border Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/glow-border-alerts)
- [Icon Only Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/icon-only-alerts)
- [Monospace Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/monospace-alerts)
- [Outlined Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/outlined-alerts)
- [Paper Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/paper-alerts)
- [Pulse Border Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/pulse-border-alerts)
- [Right Accent Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/right-accent-alerts)
- [Top Accent Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts/top-accent-alerts)
