Socket
Book a DemoInstallSign in
Socket

@aristobyte-ui/dropdown

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aristobyte-ui/dropdown

react dropdown component with trigger button, dropdownoptions, placement variants, fully typed typescript support, and composable integration with aristobyte ui button

1.0.35
latest
Source
npmnpm
Version published
Weekly downloads
448
Maintainers
1
Weekly downloads
 
Created
Source

@aristobyte-ui/dropdown

TypeScript TurboRepo ESLint License AristoByte UI Node.js >=20.17.0 Yarn >=1.22 NPM >=10.8

A fully typed, modular, and composable Dropdown component built for AristoByteUI, leveraging Button for interactive triggers and providing lightweight, performant, and flexible menus for React applications.

📦 Installation

# Install via Yarn
yarn add -D @aristobyte-ui/dropdown

# Or via npm
npm install -D @aristobyte-ui/dropdown

# Or via pnpm
pnpm add -D @aristobyte-ui/dropdown

🛠 Usage

import { Dropdown } from "@aristobyte-ui/dropdown";
import { Button } from "@aristobyte-ui/button";

export default function Example() {
  return (
    <Dropdown
      trigger={<Button variant="primary">Options</Button>}
      items={[
        { label: "Profile", onClick: () => console.log("Profile clicked") },
        { label: "Settings", onClick: () => console.log("Settings clicked") },
        { label: "Logout", onClick: () => console.log("Logout clicked") },
      ]}
      placement="bottom-start"
      disabled={false}
    />
  );
}

##📂 Presets Available

  • trigger: Any React element, commonly a Button, to toggle the dropdown.
  • items: Array of menu items, each with label, optional icon, and onClick callback.
  • placement: Positioning of the dropdown menu (e.g., top, bottom, left, right with variations like -start or -end).
  • disabled: Boolean to disable the dropdown trigger.

🔧 Example in a Package

import { Dropdown } from "@aristobyte-ui/dropdown";
import { Button } from "@aristobyte-ui/button";
import { FiSettings, FiUser } from "react-icons/fi";

export function UserMenu() {
  return (
    <Dropdown
      trigger={
        <Button variant="secondary" appearance="outline">
          Menu
        </Button>
      }
      items={[
        {
          label: "Profile",
          icon: FiUser,
          onClick: () => console.log("Profile"),
        },
        {
          label: "Settings",
          icon: FiSettings,
          onClick: () => console.log("Settings"),
        },
        { label: "Logout", onClick: () => console.log("Logout") },
      ]}
      placement="bottom-end"
    />
  );
}

📊 Why This Matters

  • Performance-first: Lightweight CSS ensures fast rendering and smooth transitions.
  • Fully typed: TypeScript-first API ensures predictable usage and IDE autocomplete.
  • AristoByteUI ready: Seamlessly integrates with design tokens, SCSS modules, and Button component composition.
  • Flexible: Supports multiple variants, appearances, sizes, radius options, icons, ripple-enabled interactive feedback, and nested menu structures.

🏆 Philosophy

  • Modular architecture: Dropdown component is fully composable with Button and other interactive elements.
  • Declarative styling: SCSS modules keep styles maintainable and scoped.
  • Strict typing & runtime flexibility: Props fully typed while allowing runtime overrides.
  • Developer experience optimized: Easy to use with predictable behavior and minimal boilerplate.

📜 License

MIT © AristoByte

🛡 Shields Showcase

Keywords

aristobyte

FAQs

Package last updated on 03 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.