Skip to content

Dropdown Menu

Dropdown Menu is part of the Disclosure and overlays group. Contextual command menu with groups, separators, checkbox/radio items, and submenus.

Terminal window
npx bambiui add dropdown-menu --framework react
Terminal window
npx bambiui add dropdown-menu --framework solid
Terminal window
npx bambiui add dropdown-menu --framework svelte
Terminal window
npx bambiui add dropdown-menu --framework vue
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "@/components/ui/dropdown-menu";
export function Example() {
return <DropdownMenu />;
}
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "~/components/ui/dropdown-menu";
export function Example() {
return <DropdownMenu />;
}
<script lang="ts">
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "$lib/components/ui/dropdown-menu";
</script>
<DropdownMenu />
<script setup lang="ts">
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem } from "@/components/ui/dropdown-menu";
</script>
<template>
<DropdownMenu />
</template>
Dropdown Menu preview should be verified in the target framework after copying the component source. Interactive behavior comes from generated public artifacts, not docs-only mock behavior.

Use for compact command lists attached to buttons, rows, or account controls.

Generated output uses serializable data-* attributes for state and styling. Controlled components fire bambi:<event-name> events and expect application state to update externally; uncontrolled components manage local source state and still fire events.

Use semantic labels, visible focus states, and keyboard interaction patterns appropriate for Dropdown Menu. Do not hide required instructions in transient UI. Verify focus movement and disabled states in the installed framework output.

DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem

Customize tokens after installing and previewing the component. Relevant tokens include:

  • --bambi-background
  • --bambi-foreground
  • --bambi-border