Skip to content

Alert Item

beta

The AlertItem component renders a single alert or notification row: a theme-colored left accent, title, relative timestamp, optional unread indicator, metadata line, and optional action link. Rows support full-row navigation via to/onClick while keeping nested action links independently clickable.

AlertItem deliberately ships without a list container. Render items inside any container you already use — a Card, a plain Layout.Vertical, or your own wrapper — and the row handles its own accent and corner rounding based on its position.

Installation

import { AlertItem } from '@harnessio/ui/components'
//...
return (
<AlertItem theme="info" read timestamp={timestamp} to="/alerts/1">
<AlertItem.Title>Company All-Hands This Friday</AlertItem.Title>
<AlertItem.Description>
Join us at 10:00 PT for the Q3 town hall...
</AlertItem.Description>
<AlertItem.Link to="/invite">View invite</AlertItem.Link>
</AlertItem>
)

To show several alerts, render multiple AlertItems inside any container of your choice.