Skip to content
Eskais UI

Feedback

Alert

Presentational alert with the shared tones (neutral, info, success, warning, destructive), a trailing action slot, long text that wraps, and an opt-in live role.

Example

Builds are queued
Three builds run ahead of yours.
Deployed
Apollo is live on the production domain.
Deploy failed
The build exited with code 1. See the log.

Installation

npx shadcn@latest add @eskais/alert
Brings alongtone
npm packagesclass-variance-authority@0.7.1

Usage

Import
import { Alert, AlertDescription, AlertTitle, alertVariants } from "@/components/ui/alert"

API reference

Alert

PropTypeDefault
toneAlertTone–
actionA trailing control, like a Button. It sits beside the text, and below it when the alert is narrower than 28rem.ReactNode–
liveMakes it a live region for messages that appear after the page loads: `role="alert"` for warning and destructive tones, which interrupts a screen reader, `role="status"` otherwise. Off by default.boolean–
announce@deprecated Use `live`. Always `role="alert"`, whatever the tone.boolean–

Also takes <div> attributes and render.

AlertTitle

Takes <div> attributes and render.

AlertDescription

Takes <div> attributes and render.

Other exports

alertVariantstype AlertPropstype AlertTone

Accessibility

  • Not a live region unless you pass live: then role=alert for warning and destructive, role=status otherwise.
  • The icon stays out of the text column and is hidden from assistive technology.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.