Command Palette

Search for a command to run...

Docs
Notifications Carousel

Notifications Carousel

A carousel-style notification component that displays one notification at a time with navigation controls.

Loading...

Installation

Props

PropTypeDefaultDescription
itemsNotificationItem[]defaultNotificationsArray of notification items
placement"top" | "bottom" | "left" | "right""bottom"Popover placement position

NotificationItem Interface

interface NotificationItem {
  id: string;
  title: string;
  description: string;
  time: string;
}

Features

  • Carousel Navigation: Navigate through notifications one at a time
  • Smooth Transitions: Smooth animation between notifications
  • Navigation Controls: Previous and next buttons for easy navigation
  • Emoji Support: Rich emoji support in notification titles
  • Placement Options: Choose where the popover appears
  • Responsive Design: Works well on different screen sizes

Usage

import NotificationsCarousel from "@/components/ui/notifications-carousel";
 
export default function Example() {
  const notifications = [
    {
      id: "1",
      title: "πŸŽ‰ Welcome",
      description: "Thanks for checking out the carousel notifications!",
      time: "just now",
    },
    {
      id: "2",
      title: "⚑ System Update",
      description: "A new feature has been rolled out to your account.",
      time: "1h ago",
    },
    {
      id: "3",
      title: "⏰ Reminder",
      description: "Don't forget to complete your profile setup.",
      time: "3h ago",
    },
    {
      id: "4",
      title: "πŸ“Š Weekly Report",
      description: "Your weekly report is now available.",
      time: "1d ago",
    },
  ];
 
  return (
    <div className="p-6">
      {/* Default carousel */}
      <NotificationsCarousel />
 
      {/* Custom notifications */}
      <NotificationsCarousel items={notifications} placement="top" />
    </div>
  );
}