Skip to content

Combobox/Dropdown vNext: naming of package components #21989

Description

@smhigley

The naming of the combobox and combobox-adjacent components is a little more complex than most other components, since there are multiple highly interdependent components with shared internals that are replacing v8 components that multiple different names.

Exported component list

All of these names are up for discussion, and for obvious reasons ComboboxBaseThing is not an actual suggestion. All other names are what is currently used in the package, but not at all set in stone.

  • ComboboxBaseThing (the base control of Combobox and Dropdown, all combo/dropdown functionality is in here apart from the unique trigger implementations)
  • Combobox (extends ComboboxBaseThing with a freeform/editable input as the trigger slot)
  • Dropdown (extends ComboboxBaseThing with a select-only/non-editable button as the trigger slot)
  • Listbox (the dropdown in Combobox/Dropdown, also can be used on its own)
  • OptionGroup (optionally groups options within a listbox)
  • Option (the child items in a listbox)

Package name

Currently the package is react-combobox, but the standalone components within it are (at least proposed) Combobox, Dropdown, and Listbox. Should the package itself be generalized to something like react-pickers? react-selection?

react-select

There is separately a react-select package that exports a Select component that is a wrapper for the HTML <select> element, which more or less removes the "Select" name as a possibility for combobox/dropdown/etc., at least unless we change this package too.

Considerations

  • Using Dropdown and Combobox to mean select-only and editable aligns with v8, more or less.
  • v0 uses Dropdown for editable and select-only variations
  • Combobox is more common in Open UI's research, and "Dropdown" refers to non-selection widgets like menus in other libraries as well
  • Having non Combobox-prefixed widgets exported from react-combobox is not consistent with other package naming conventions

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions