name: Picker
status: Verified
SpectrumSiteSlug: https://spectrum.adobe.com/page/picker/
sections:
- name: Migration Guide
description: |
### Component renamed
Dropdown is now known as Picker. Replace all `.spectrum-Dropdown*` classnames with `.spectrum-Picker*`.
### Markup change
The outer `
` is now gone and `.spectrum-FieldButton` is no longer used. Instead, the outer tag is now `
` with the `.spectrum-Picker` classname.
Additionally, `.spectrum-Picker` should not contain the `.spectrum-Popover` that it opens.
### Icon classname changes
Each of the 3 possible icons now has its own specific classname:
| Previous icon classname | Workflow icon classname |
| --------------------------------- | --------------------------------- |
| `.spectrum-Picker-icon` | `.spectrum-Picker-menuIcon` |
| `.spectrum-Icon` (workflow) | `.spectrum-Picker-icon` |
| `.spectrum-Icon` (validation) | `.spectrum-Picker-validationIcon` |
### `.is-selected` is now `.is-open`
In order to more accurately reflect what's going on, you should add `.is-open` to `.spectrum-Picker` when the menu is shown.
### Change workflow icon size to medium
If you use a `.spectrum-Picker-icon` in your markup, please replace `.spectrum-Icon--sizeS` with `.spectrum-Icon--sizeM`.
### T-shirt sizing
Picker now supports t-shirt sizing and requires that you specify the size by adding a `.spectrum-Picker--size*` class.
Using the classes `.spectrum-Picker .spectrum-Picker--sizeM` will get result in the previous default picker size.
Also, use the correct icon size for chevron icons:
| T-shirt Size | Icon Size |
|---------------------------|--------------------------------|
| `spectrum-Picker--sizeS` | `spectrum-css-icon-Chevron75` |
| `spectrum-Picker--sizeM` | `spectrum-css-icon-Chevron100` |
| `spectrum-Picker--sizeL` | `spectrum-css-icon-Chevron200` |
| `spectrum-Picker--sizeXL` | `spectrum-css-icon-Chevron300` |
examples:
- id: picker
name: Standard
markup: |
Closed
Select a Country with a very long label, too long in fact
Open
Donaudampfschifffahrtsgesellschaftskapitän
With Thumbnails
Donaudampfschifffahrtsgesellschaftskapitän
Disabled
Select a Country
Closed
Select a Country
Open
Ballard
Disabled
Select a Country
- id: picker
name: Sizing
markup: |
S
Select a Country
M
Select a Country
L
Select a Country
XL
Select a Country
- id: picker-quiet
name: Quiet
status: Verified
markup: |
Closed
Select a Country
Open
Ballard
With Thumbnails
Ballard
Disabled
Select a Country
Closed
Select a Country
Open
Ballard
Disabled
Select a Country