Skip to content

Dropdown

Provides a button that toggles a list of selectable options (dropdown items).

First release: 1.0.0 Latest update: July 1, 2025 Current version: 1.0.0

React Angular Vue Svelte HTML

Import

import { PlusDropdown } from '@plusui/react';
import { PlusDropdownComponent } from '@plusui/angular';
import { PlusDropdown } from '@plusui/vue';
import PlusDropdown from '@plusui/svelte';
<script src="https://cdn.jsdelivr.net/npm/@plusui/core"></script>

Package

@plusui/react
@plusui/angular
@plusui/vue
@plusui/svelte
@plusui/core

Docs

Changelog

Dropdown Changelog

Recent changes and updates for the dropdown component

v1.0.0

June 20, 2025
Feat

Added Dropdown component for menus

  • Customizable trigger elements
  • Multiple positioning options
  • Keyboard navigation
  • Accessibility support

The Dropdown component consists of a trigger button (plus-button) and a panel (dropdown-box) containing a list of options (plus-dropdown-item). Clicking the button toggles the visibility of the panel.

Dropdown - anatomy

A dropdown requires a trigger (implicitly a plus-button) and plus-dropdown-item elements placed within the dropdown-item slot.

Select OptionOption 1Option 2Option 3
Show code

Trigger Button Appearance (kind, status, size)

Section titled “Trigger Button Appearance (kind, status, size)”

Customize the appearance of the trigger button using the kind, status, and size props. These props are passed down to the internal plus-button.

Outlined Primary SMItem AItem BDashed Success MDItem AItem BText Danger LGItem AItem B
Show code

The entire dropdown can be disabled using the disabled prop on plus-dropdown. Individual items can be disabled using the disabled prop on plus-dropdown-item.

Disabled DropdownCannot selectDropdown with Disabled ItemOption 1Option 2 (Disabled)Option 3
Show code

Customize the trigger button’s content using the default slot. Use the suffix slot for content on the right (like an additional icon). The text prop can be used as an alternative to the default slot.

My Account

ProfileSettings
Options via SlotAction 1
Show code

Listen for the plus-dropdown-selected-item event to get the selected plus-dropdown-item element when an option is chosen.

Choose ColorRedGreenBlue

Selected: None

Show code
Show console
Dropdown - layout spacing Dropdown - light & dark mode
  • Keyboard Behavior:
    • The trigger button is focusable (Tab).
    • Pressing Enter or Space on the button opens/closes the dropdown.
    • When the dropdown is open:
      • ArrowDown / ArrowUp navigates through focusable items.
      • Enter or Space selects the focused item and closes the dropdown.
      • Escape closes the dropdown without selection.
      • Typing letters generally focuses the next item starting with that letter (browser implementation may vary).
  • Screen Reader:
    • The trigger button uses role="button", aria-haspopup="listbox", and aria-expanded to indicate its function and state.
    • aria-controls links the button to the dropdown panel (role="listbox").
    • Dropdown items use role="option", aria-selected, and aria-disabled.
    • Ensure items have meaningful text content either via the slot or the text prop.
  • Required Developer Actions:
    • Provide clear and concise text for the trigger button (via slot or text prop).
    • Ensure each plus-dropdown-item has meaningful content.
    • If using custom content within items, ensure it’s accessible.
Site favicon Plus UI Design System on Figma
Visit
NameTypeDefaultDescriptionRequired
size'sm' | 'md' | 'lg''md'Sets the size of the trigger button and influences item size.No
status'default' | 'primary' | 'success' | 'warning' | 'danger' | 'info''default'Sets the status/color variant of the trigger button.No
kind'filled' | 'outlined' | 'dashed' | 'text''filled'Sets the visual style of the trigger button.No
disabledbooleanfalseDisables the dropdown interaction (trigger button).No
textstringundefinedSets the text content of the trigger button (alternative to default slot).No
NameTypeDefaultDescriptionRequired
size'sm' | 'md' | 'lg''md'Sets the size of the dropdown item (usually matches dropdown size).No
disabledbooleanfalseDisables the item, making it non-selectable.No
selectedbooleanfalseIndicates if the item is currently selected (managed by parent dropdown).No
textstringundefinedText content for the item (alternative to slot), used for aria-label.No
NamePayload TypeDescription
plus-dropdown-openCustomEvent<void>Fired when the dropdown panel opens.
plus-dropdown-closeCustomEvent<void>Fired when the dropdown panel closes.
plus-dropdown-selected-itemCustomEvent<{ selectedItem: HTMLElement }>Fired when an item is selected. detail.selectedItem is the selected plus-dropdown-item element.
NameDescription
default (unnamed)Content for the trigger button (overrides text prop).
suffixContent placed to the right of the trigger button content.
dropdown-itemContainer for plus-dropdown-item elements.
NameDescription
default (unnamed)The main content displayed within the item.
PartDescription
baseThe main wrapper element.
buttonThe trigger button (plus-button).
dropdown-boxThe dropdown panel container (div).
PartDescription
baseThe base wrapper of the item (div or host).
itemThe listbox item element (plus-list-box-item).

CSS Custom Properties (plus-dropdown-item)

Section titled “CSS Custom Properties (plus-dropdown-item)”
NameDescription
--i-bg-defaultDefault background color.
--i-bg-hoveredBackground color on hover.
--i-bg-pressedBackground color when pressed/active.
--i-text-colorText color.
--i-selected-bgBackground color when selected.

Join the Community

Plus UI is built by the community. Join us on our platforms to contribute, get help, and stay up to date.