Skip to content

Select

Displays a collapsible menu with a list of selectable options.

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

React Angular Vue Svelte HTML

Import

import { PlusSelect } from '@plusui/react';
import { PlusSelectComponent } from '@plusui/angular';
import { PlusSelect } from '@plusui/vue';
import PlusSelect 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

Select Changelog

Recent changes and updates for the select component

v1.0.0

June 26, 2025
Fix

Resolved dropdown positioning and z-index issues.

  • Fixed issues where the select dropdown would be overlapped by other elements or misaligned.
  • This change is part of the "Form System Critical Fixes" EPIC (#72).
Feat

Added Select component with dropdown

  • Customizable dropdown with floating UI
  • Multiple selection support
  • Search and filter functionality
  • Keyboard navigation
  • Accessibility with ARIA attributes

The Select (plus-select) component provides a dropdown menu (plus-select-item) allowing users to choose one option from a list. It leverages Floating UI for intelligent positioning of the menu.

Select - anatomy

A simple select component with several options. The value displayed corresponds to the text property or the slotted content of the selected plus-select-item.

Option 1Option 2Option 3
Show code
Show console

Control the size using the size prop.

Option 1Option 1Option 1
Show code

Use label for the select title and caption for hint text below.

United StatesCanada
Show code

The placeholder is shown when no item is selected.

AppleBanana
Show code

Use disabled to prevent all interaction or readonly to prevent changing the selection.

Option 1Option 1Option 2
Show code

Set error to indicate validation errors. Often combined with caption.

Option 1
Show code

Allows the user to deselect the current option.

Option 1Option 2
Show code

Set the disabled attribute on individual plus-select-item components to prevent their selection.

Enabled OptionDisabled OptionAnother Enabled
Show code
Select - layout spacing Select - light & dark mode
  • Keyboard Behavior:
    • When the select trigger (plus-input) has focus:
      • Enter, Space, ArrowDown, ArrowUp: Opens the dropdown menu and focuses the selected item (or first/last if none selected).
    • When the dropdown menu (role="listbox") is open:
      • ArrowDown: Moves focus to the next item. Wraps around.
      • ArrowUp: Moves focus to the previous item. Wraps around.
      • Home: Moves focus to the first non-disabled item.
      • End: Moves focus to the last non-disabled item.
      • Enter or Space: Selects the focused item and closes the menu.
      • Escape: Closes the menu without changing the selection.
      • Tab: Closes the menu and moves focus to the next focusable element.
  • Screen Reader:
    • The select trigger uses role="combobox", aria-haspopup="listbox", and aria-expanded indicates the menu state.
    • The dropdown menu uses role="listbox".
    • Each plus-select-item uses role="option", aria-selected indicates selection, and aria-disabled indicates the disabled state.
    • An accessible name for the combobox should be provided via the label prop or aria-label/aria-labelledby.
    • Item labels are derived from the text prop or slotted content.
  • Required Developer Actions:
    • Provide an accessible label for the plus-select component using the label prop or aria-label.
    • Ensure each plus-select-item has meaningful content (using the text prop or default slot) to serve as its accessible name.
NameTypeDefaultDescriptionRequired
size'sm' | 'md' | 'lg''md'Size of the select button.No
placeholderstring''Placeholder text when no item is selected.No
labelstring''Label text for the select.No
errorbooleanfalseIndicates if the select is in an error state.No
disabledbooleanfalseDisables the select, preventing interaction.No
requiredbooleanfalseMarks the select as required.No
readonlybooleanfalseMakes the select read-only, preventing changes.No
captionstringundefinedCaption text displayed below the select.No
clearablebooleanfalseEnables a clear button to reset the selection.No
NamePayload TypeDescription
plus-select-openCustomEvent<void>Emitted when the select menu is opened.
plus-select-closeCustomEvent<void>Emitted when the select menu is closed.
plus-select-selected-itemCustomEvent<{ selectedItem: PlusSelectItem }>Emitted when an item is selected.
NameDescription
(default)Content for the select trigger button (overrides default).
suffixContent for the right side of the trigger button.
select-itemContains the plus-select-item elements for the menu.
NameDescription
baseThe component’s base wrapper (div).
selectThe select trigger (plus-input).
select-boxThe select list container (div).

NameTypeDefaultDescriptionRequired
size'sm' | 'md' | 'lg''md'Size of the select item (usually inherited from plus-select).No
disabledbooleanfalseDisables the item, preventing selection.No
selectedbooleanfalseIndicates if the item is currently selected (managed by parent).No
textstringundefinedText content override. If set, used for display and aria-label.No
valuestring''The value associated with this item.Yes

Selection events are handled by the parent plus-select component (plus-select-selected-item).

NameDescription
(default)The content displayed inside the item (text, icons, etc.).
NameDescription
baseThe component’s base wrapper (div).
itemThe listbox item element (plus-list-box-item).
NameDescription
--i-bg-defaultDefault background color.
--i-bg-hoveredBackground color when hovered.
--i-bg-pressedBackground color when pressed.
--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.