Modus UI

Animated List

Web (React)

A scrollable, animated list component with keyboard navigation, hover states, and smooth entrance physics.

A scrollable, animated list component with keyboard navigation, hover states, and smooth entrance physics. Perfect for settings menus, notifications, or selecting items from a large list.

  • Profile Settings

    Manage your account details and preferences

  • Notifications

    Configure your email and push alerts

  • Security

    Password, 2FA, and active sessions

  • Billing

    Payment methods and invoice history

  • Integrations

    Connect third-party apps and APIs

  • Terms of Service

    Read our latest usage policies

  • Advanced

    Danger zone and developer settings

Installation

CLI

npx @modus-ui/cli add animated-list

Manual

  1. Copy the code from the component tab.
  2. Create a file at components/ui/animated-list.tsx.
  3. Paste the code.

Usage

tsx
import { AnimatedList } from "@/components/ui/animated-list";

export default function Example() {
  const items = ["Item 1", "Item 2", "Item 3"];

  return <AnimatedList items={items} />;
}

Props

PropTypeDefaultDescription
itemsReactNode[] | string[][...]The items to display in the list.
onItemSelect(item: any, index: number) => void-Callback when an item is clicked or selected via Enter key.
itemClassNamestring-Classes for each item.
showGradientsbooleantrueWhether to show fading gradients at the top and bottom of the scroll container.
enableArrowNavigationbooleantrueWhether to enable up/down arrow and tab key navigation.
displayScrollbarbooleantrueWhether to show the scrollbar.
initialSelectedIndexnumber-1The index of the item that is selected initially.

Comments

  • No comments yet.