> ## Documentation Index
> Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Notification Card – Code

> NotificationCard displays notification items with title, message, and timestamp.

> [!WARNING]
>
> Atlas is deprecated. Use [AI Kit](https://anvil.servicetitan.com/docs/building-agentic-experiences) for any new Atlas experiences.

> [tab] Implementation
>
> ext-atlas-notification-card-demo
>
> [StackBlitz demo](https://stackblitz.com/github/servicetitan/anvil2-docs-live-code/tree/main/examples/ext-atlas-notification-card-demo?file=src/App.tsx)
>
> ```tsx lines expandable theme={null}
> import { NotificationCard } from "@servicetitan/anvil2-ext-atlas";
> import { Card, Flex } from "@servicetitan/anvil2";
>
> function App() {
>   return (
>     <Flex direction="column" gap={4} style={{ width: "388px" }}>
>       <Card flexDirection="column" gap={2} background="strong">
>         <NotificationCard
>           title="New Message"
>           message="You have a new message from John Doe"
>           timestamp="2 hours ago"
>           unread={false}
>           onClick={() => console.log("notification clicked")}
>         />
>       </Card>
>
>       <Card flexDirection="column" gap={2} background="strong">
>         <NotificationCard
>           title="Important Update"
>           message="Your account settings have been updated"
>           timestamp="Just now"
>           unread={true}
>           onClick={() => console.log("notification clicked")}
>         />
>       </Card>
>     </Flex>
>   );
> }
>
> export default App;
> ```
>
> ## Common Examples
>
> ### Basic Usage
>
> Display a notification:
>
> ```tsx theme={null}
> import { NotificationCard } from "@servicetitan/anvil2-ext-atlas";
>
> function Notification() {
>   return (
>     <NotificationCard
>       title="New message from Atlas"
>       message="Your appointment has been confirmed for tomorrow."
>       timestamp="2 min ago"
>       unread
>       onClick={() => openConversation()}
>     />
>   );
> }
> ```
>
> ### Read Notification
>
> Display a read notification:
>
> ```tsx theme={null}
> import { NotificationCard } from "@servicetitan/anvil2-ext-atlas";
>
> function ReadNotification() {
>   return (
>     <NotificationCard
>       title="Previous message"
>       message="Thanks for your feedback!"
>       timestamp="1 hour ago"
>       onClick={() => openConversation()}
>     />
>   );
> }
> ```
>
> ### Notification List
>
> Display multiple notifications:
>
> ```tsx theme={null}
> import { NotificationCard } from "@servicetitan/anvil2-ext-atlas";
>
> function NotificationList({ notifications }) {
>   return (
>     <div>
>       {notifications.map((notification) => (
>         <NotificationCard
>           key={notification.id}
>           title={notification.title}
>           message={notification.message}
>           timestamp={notification.timestamp}
>           unread={notification.unread}
>           onClick={() => handleClick(notification.id)}
>         />
>       ))}
>     </div>
>   );
> }
> ```

> [tab] NotificationCard API
>
> ```tsx theme={null}
> <NotificationCard
>   title="Notification title"
>   message="Notification message"
>   timestamp="2 min ago"
>   unread={true}
>   onClick={handleClick}
> />
> ```
>
> ## `NotificationCard` Props
>
> **message** `string` *required*
>
> The notification message content (supports markdown).
>
> **timestamp** `string` *required*
>
> The timestamp to display.
>
> **title** `string` *required*
>
> The notification title.
>
> **onClick** `() =\> void`
>
> Callback fired when the notification card is clicked.
>
> **unread** `boolean` (default: false)
>
> When true, shows the unread indicator and bolds the content.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.