DropDown

A neumorphic dropdown menu with three style variants, smooth animations, and fragmented item layout.

TSX
import { DropDown } from "looply-comp-lib";

Overview

The DropDown component renders one or more dropdown menus with neumorphic styling. Each menu item appears as its own separate neumorphic block (fragmented layout), and the list animates in smoothly on open.

Usage

JSX
import { DropDown } from "looply-comp-lib";

<DropDown
  dropDowns={[
    {
      dropDownType: "neu-flat",
      dropDownMenuLabel: "Menu",
      dropDownItem: [
        { dropDownLable: "Profile", dropDownURL: "/userinfo" },
        { dropDownLable: "Settings", dropDownURL: "/userinfo" },
        { dropDownLable: "Docs", dropDownURL: "/docs" },
        { dropDownLable: "Logout" },
      ],
    },
  ]}
/>

Props

PropTypeDescription
dropDownsdropDownMenu[]Array of dropdown menu configurations

dropDownMenu

PropTypeDescription
dropDownType"neu-flat" | "neu-raised" | "neu-inset"Visual style variant
dropDownMenuLabelstringLabel shown on the trigger button
dropDownItemdropdownContent[]Array of menu items

dropdownContent

PropTypeDefaultDescription
dropDownLablestringText label for the menu item
dropDownURLstring"#"Optional URL to navigate to on click

Variants

  • Flat sits flush on the surface, items sink inward on hover
  • Raised elevated above the surface, items sink inward on hover
  • Inset pressed into the surface, items pop out flat on hover

Features

  • Fragmented item layout, each dropdown item is its own neumorphic block
  • Smooth fadeSlideIn animation on open
  • Chevron icon rotates when open/closed
  • Only one dropdown open at a time (opening one closes the others)
  • Styles applied via styleMap lookup, no duplicated markup

Live Demo