Select

Select allows users to make a single selection or multiple selections from a list of options.

Neutral selected states

When the platform-dst-tokens-finesse feature flag is enabled, this component uses the new neutral treatment for selected states.

Motion in Early Access

Motion updates for multi-value Select tags are in Early Access and available behind the platform-dst-motion-uplift-labels feature flag.

Installation

Package installation information
Installyarn add @atlaskit/select
SourceBitbucket.org, (opens new window)
npm@atlaskit/select, (opens new window)
Bundleunpkg.com, (opens new window)

Props

@atlaskit/select is based on the react-select library, and supports many of the same props. If you're looking for more advanced customization examples that aren't shown here, refer to the react-select documentation.

allowCreateWhileLoading

Description

Allow options to be created while the isLoading prop is true. Useful to prevent the "create new ..." option being displayed while async results are still being loaded.

Typeany

appearance

Description
No description.
Type"default" | "subtle" | "none"

aria-describedby

Deprecated
Description

HTML ID of an element that should be used as a description (for assistive tech)

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} Use descriptionId instead.

Typestring

aria-errormessage

Deprecated
Description

HTML ID of an element containing an error message related to the input

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} aria-errormessage is not supported widely by assistive technologies. Do not use!

Typestring

aria-invalid

Deprecated
Description

Indicate if the value entered in the field is invalid

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} Use isInvalid instead.

Typeboolean | "false" | "true" | "grammar" | "spelling"

aria-label

Deprecated
Description

Aria label (for assistive tech)

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} Use label instead.

Typestring

aria-labelledby

Deprecated
Description

HTML ID of an element that should be used as the label (for assistive tech)

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} Use labelId instead.

Typestring

aria-live

Deprecated
Description

Used to set the priority with which screen reader should treat updates to live regions. The possible settings are: off, polite (default) or assertive

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} Will be removed in future versions.

Type"off" | "assertive" | "polite"

ariaLiveMessages

Deprecated
Description

Customise the messages used by the aria-live component

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}

TypeAriaLiveMessages<Option, IsMulti, GroupBase<Option>>

autoFocus

Description

Focus the control when it is mounted. There are very few cases that this should be used, and using incorrectly may violate accessibility guidelines.

Typeboolean

backspaceRemovesValue

Deprecated
Description

Remove the currently focused option when the user presses backspace when Select isClearable or isMulti

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be handled automatically to support expected keyboard accessibility.

Typeboolean

blurInputOnSelect

Description

Remove focus from the input when the user selects an option (handy for dismissing the keyboard on touch devices)

Typeboolean

cacheOptions

Description

If cacheOptions is truthy, then the loaded data will be cached. The cache will remain until cacheOptions changes value.

Typeany

captureMenuScroll

Deprecated
Description

When the user reaches the top/bottom of the menu, prevent scroll on the scroll-parent

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}

Typeboolean

className

Deprecated
Description

Sets a className attribute on the outer component

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} If used for testing purposes, use the testId prop as a locator instead. If used for styling purposes, use the components API with the xcss prop

Typestring

classNamePrefix

Description

If provided, all inner components will be given a prefixed className attribute.

This is useful when styling via CSS classes instead of the Styles API approach.

Typestring

classNames

Description

Provide classNames based on state for each inner component

Type{ clearIndicator?: (props: ClearIndicatorProps<Option, IsMulti, GroupBase<Option>>) => string; container?: (props: ContainerProps<Option, IsMulti, GroupBase<...>>) => string; ... 18 more ...; valueContainer?: (props: ValueContainerProps<...>) => string; }

clearControlLabel

Description

Set the aria-label for the clear icon button.

Typestring

closeMenuOnScroll

Deprecated
Description

If true, close the select menu when the user scrolls the document/body.

If a function, takes a standard javascript ScrollEvent you return a boolean:

true => The menu closes

false => The menu stays open

This is useful when you have a scrollable modal and want to portal the menu out, but want to avoid graphical issues.

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}

Typeboolean | ((event: Event) => boolean)

closeMenuOnSelect

Description

Close the select menu when the user selects an option

Typeboolean

components

Description

This complex object includes all the compositional components that are used in react-select. If you wish to overwrite a component, pass in an object with the appropriate namespace. If you wish to restyle a component, we recommend using this prop with the xcss prop.

Type{ Option?: React.ComponentType<OptionProps<Option, IsMulti, GroupBase<Option>>>; Group?: React.ComponentType<GroupProps<Option, IsMulti, GroupBase<...>>>; ... 19 more ...; ValueContainer?: React.ComponentType<...>; }

controlShouldRenderValue

Deprecated
Description

Whether the value of the select, e.g. SingleValue, should be displayed in the control.

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}

Typeboolean

createAnalyticsEvent

Description

You should not be accessing this prop under any circumstances. It is provided by @atlaskit/analytics-next and integrated in the component

Type(payload: AnalyticsEventPayload) => UIAnalyticsEvent

createOptionPosition

Description

Sets the position of the createOption element in your options list. Defaults to 'last'

Typeany

defaultInputValue

Description
No description.
Typestring

defaultMenuIsOpen

Description
No description.
Typeboolean

defaultOptions

Description

The default set of options to show before the user starts searching. When set to true, the results for loadOptions('') will be autoloaded.

Typeany

defaultValue

Description
No description.
TypeOption | MultiValue<Option>

delimiter

Deprecated
Description

Delimiter used to join multiple values into a single HTML Input value

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}

Typestring

descriptionId

Description

This sets the aria-describedby attribute. It sets an accessible description for the select, for people who use assistive technology. Use '<HelperMessage>' from '@atlaskit/form' is preferred.

Typestring

escapeClearsValue

Deprecated
Description

Clear all values when the user presses escape AND the menu is closed.

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be handled automatically to support expected keyboard accessibility.

Typeboolean

filterOption

Description

Custom method to filter whether an option should be displayed in the menu

Type(option: FilterOptionOption<Option>, inputValue: string) => boolean

form

Description

Sets the form attribute on the input

Typestring

formatCreateLabel

Description

Gets the label for the "create new ..." option in the menu. Is given the current input value.

Typeany

formatGroupLabel

Description

Formats group labels in the menu as React components

An example can be found in the Replacing builtins documentation.

Type(group: GroupBase<Option>) => React.ReactNode

formatOptionLabel

Description

Formats option labels in the menu and control as React components

Type((data: Option, formatOptionLabelMeta: FormatOptionLabelMeta<Option>) => React.ReactNode) | ((data: Option, formatOptionLabelMeta: FormatOptionLabelMeta<Option>) => React.ReactNode)

getNewOptionData

Description

Returns the data for the new option when it is created. Used to display the value, and is passed to onChange.

Typeany

getOptionLabel

Description

Resolves option data to a string to be displayed as the label by components

Note: Failure to resolve to a string type can interfere with filtering and screen reader support.

Type(option: Option) => string

getOptionValue

Description

Resolves option data to a string to compare options and specify value attributes

Type(option: Option) => string

hideSelectedOptions

Description

Hide the selected option from the menu

Typeboolean

id

Description

The id to set on the SelectContainer component.

Typestring

inputId

Description

The id of the search input

Typestring

inputValue

Description

The value of the search input

Typestring

instanceId

Description

Define an id prefix for the select components e.g. {your-id}-value

Typestring | number

isClearable

Description

Is the select value clearable

Typeboolean

isDisabled

Description

Is the select disabled

Typeboolean

isInvalid

Description

Is the select invalid

Typeboolean

isLoading

Description

Is the select in a state of loading (async) Is the select in a state of loading (async) Will cause the select to be displayed in the loading state, even if the Async select is not currently waiting for loadOptions to resolve

Typeboolean

isMulti

Description

Support multiple selected options

TypebooleanIsMulti

isOptionDisabled

Description

Override the built-in logic to detect whether an option is disabled

An example can be found in the Replacing builtins documentation.

Type(option: Option, selectValue: Options<Option>) => boolean

isOptionSelected

Description

Override the built-in logic to detect whether an option is selected

Type(option: Option, selectValue: Options<Option>) => boolean

isRequired

Description

This prop indicates if the component is required.

Typeboolean

isRtl

Deprecated
Description

Is the select direction right-to-left

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}

Typeboolean

isSearchable

Description

Whether to enable search functionality

Typeboolean

isValidNewOption

Description

Determines whether the "create new ..." option should be displayed based on the current input value, select value and options array.

Typeany

label

Description

This sets the aria-label attribute. It sets an accessible name for the select, for people who use assistive technology. Use of a visible label is highly recommended for greater accessibility support.

Typestring

labelId

Description

This sets the aria-labelledby attribute. It sets an accessible name for the select, for people who use assistive technology. Use of a visible label is highly recommended for greater accessibility support.

Typestring

loadingMessage

Description

Async: Text to display when loading options

Type(obj: { inputValue: string; }) => React.ReactNode

loadOptions

Description

Function that returns a promise, which is the set of options to be used once the promise resolves.

Typeany

maxMenuHeight

Description

Maximum height of the menu before scrolling

Typenumber

menuIsOpen

Description

Whether the menu is open

Typeboolean

menuPlacement

Description

Default placement of the menu in relation to the control. 'auto' will flip when there isn't enough space below the control.

Type"auto" | "bottom" | "top"

menuPortalTarget

Description

Whether the menu should use a portal, and where it should attach

An example can be found in the Portaling documentation

TypeHTMLElement

menuPosition

Description

The CSS position value of the menu, when "fixed" extra layout management is required

Type"absolute" | "fixed"

menuRenderMode

Description

Controls how the menu is rendered. The default popup mode uses the normal transient menu rendering. The inline mode keeps the menu open and renders it within the parent layout.

Type"popup" | "inline"

menuShouldBlockScroll

Deprecated
Description

Whether to block scroll events when the menu is open

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}

Typeboolean

menuShouldScrollIntoView

Description

Whether the menu should be scrolled into view when it opens

Typeboolean

minMenuHeight

Description

Minimum height of the menu before flipping

Typenumber

name

Description

Name of the HTML Input (optional - without this, no input will be rendered)

Typestring

noOptionsMessage

Description

Text to display when there are no options

Type((obj: { inputValue: string; }) => React.ReactNode) | ((obj: { inputValue: string; }) => React.ReactNode)

onBlur

Description

Handle blur events on the control

Type(event: React.FocusEvent<HTMLInputElement, Element>) => void

onChange

Description

Handle change events on the select

Type(newValue: OnChangeValue<Option, IsMulti>, actionMeta: ActionMeta<Option>) => void

onClickPreventDefault

Description
No description.
Typeboolean

onCreateOption

Description

If provided, this will be called with the input value when a new option is created, and onChange will not be called. Use this when you need more control over what happens when new options are created.

Typeany

onFocus

Description

Handle focus events on the control

Type(event: React.FocusEvent<HTMLInputElement, Element>) => void

onInputChange

Description

Handle change events on the input

Type(newValue: string, actionMeta: InputActionMeta) => void

onKeyDown

Description

Handle key down events on the select

Type(event: React.KeyboardEvent<HTMLDivElement>) => void

onMenuClose

Description

Handle the menu closing

Type() => void

onMenuOpen

Description

Handle the menu opening

Type() => void

onMenuScrollToBottom

Description

Fired when the user scrolls to the bottom of the menu

Type(event: WheelEvent | TouchEvent) => void

onMenuScrollToTop

Description

Fired when the user scrolls to the top of the menu

Type(event: WheelEvent | TouchEvent) => void

openMenuOnClick

Deprecated
Description

Allows control of whether the menu is opened when the Select is clicked

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be removed to support expected accessibility interactions.

Typeboolean

openMenuOnFocus

Deprecated
Description

Allows control of whether the menu is opened when the Select is focused

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be removed to support expected accessibility interactions.

Typeboolean

options

Description

Array of options that populate the select menu

Typereadonly (Option | GroupBase<Option>)[]

pageSize

Description

Number of options to jump in menu when page{up|down} keys are used

Typenumber

placeholder

Description

Placeholder for the select value

Typestring | number | boolean | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal

ref

Description
TypeReact.Ref<any> & React.Ref<AtlaskitSelectRefType>

required

Deprecated
Description

Marks the value-holding input as required for form validation

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} Use isRequired instead.

Typeboolean

screenReaderStatus

Deprecated
Description

Status to relay to screen readers

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}

Type(obj: { count: number; }) => string

shouldPreventEscapePropagation

Description

Prevents "Escape" keydown event propagation

Typeboolean

spacing

Description

This prop affects the height of the select control. Compact is gridSize() * 4, default is gridSize * 5

Type"compact" | "default"

styles

Deprecated
Description

Style modifier methods

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)} Use the components API with the xcss prop for custom styling.

Type{ clearIndicator?: (base: any, props: ClearIndicatorProps<Option, IsMulti, GroupBase<Option>>) => any; container?: (base: any, props: ContainerProps<...>) => any; ... 18 more ...; valueContainer?: (base: any, props: ValueContainerProps<...>) => any; }

tabIndex

Description

Sets the tabIndex attribute on the input for focus. Since focus is already managed, the only acceptable value to be used is '-1' in rare cases when removing this field from the document tab order is required.

Typenumber

tabSelectsValue

Deprecated
Description

Select the currently focused option when the user presses tab

{@link https://hello.atlassian.net/browse/ENGHEALTH-14529 Internal documentation for deprecation (no external access)}. Will soon be handled automatically to support expected keyboard accessibility.

Typeboolean

testId

Description

A unique string that appears as data attribute data-testid in the rendered code, serving as a hook for automated tests. Use this instead of using ARIA properties as locators.

  • Container: ${testId}-select--container
  • Control : ${testId}-select--control
  • Value container: ${testId}-select--value-container
  • Placeholder: ${testId}-select--placeholder
  • Input container: ${testId}-select--input-container
  • Input: ${testId}-select--input
  • Indicators container: ${testId}-select--indicators-container
  • Dropdown indicator: ${testId}-select--dropdown-indicator
  • Clear indicator: ${testId}-select--clear-indicator
  • Loading indicator: ${testId}-select--loading-indicator
  • Listbox container: ${testId}-select--listbox-container
  • Listbox: ${testId}-select--listbox
  • Option group heading: ${testId}-select--group-${groupIndex}-heading
  • Option: ${testId}-select--option-${id}
Typestring

UNSAFE_is_experimental_generic

Description
No description.
Typeboolean

validationState

Deprecated
Description

Use isInvalid instead. The state of validation if used in a form.

Type"default" | "error" | "success"

value

Description

The value of the select; reflected by the selected option

TypeOption | MultiValue<Option>
Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License