Animated Dropdown

Use Animated Dropdown when an action list needs keyboard-accessible menu behavior with a small, origin-aware entrance. Compose its trigger, content, items, and optional separators to match your product's actions.

Preview

Reduce motion:Off
Tune:Off
Inspect

Installation

Basic usage

TypeScript
my-dropdown.tsx

Examples

Destructive action

Use the danger variant for an action that needs a destructive visual treatment. Add a separator when the destructive action belongs in its own group.

Controlled state

Use controlled open state when another part of the interface needs to control the menu.

TypeScript
controlled-dropdown.tsx

Positioning

Use the side, alignment, and offset options to position the popup relative to its trigger.

TypeScript
positioned-dropdown.tsx

Usage

API

PropertyTypeDefaultDescription
childrenReactNoderequired
openboolean—Controlled open state.
defaultOpenbooleanfalseInitial open state for uncontrolled usage.
onOpenChange(open: boolean) => void—Callback when open state changes.
disabledbooleanfalseWhether the menu ignores user interaction.
modalbooleantrueWhether the open menu limits interaction to the menu.

Accessibility

The component uses Base UI menu semantics. It supports keyboard navigation, typeahead, focus management, and a modal menu by default. Keep item labels clear, and disable an item only when its action cannot be performed.

Use a non-modal menu only when people must continue interacting with surrounding content while it is open.

Styling

Use the component class name options on the trigger, content, items, or separator to adapt the component to its context. The popup positions and scales from Base UI's transform origin, and reduced-motion preferences remove the entrance transition.

Contact

Found a bug or need help using this component? Open an issue on GitHub.

License & Usage

Sona UI is available under the MIT license. You may use, modify, and distribute this component in personal and commercial projects.

Was this page helpful?

Your response helps us improve component docs.

Related components