Country select

Country select allows users to make a single selection from a list of countries.

Props

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<Country, false, GroupBase<Country>>

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

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<Country, false, GroupBase<Country>>) => string; container?: (props: ContainerProps<Country, false, 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<Country, false, GroupBase<Country>>>; Group?: React.ComponentType<GroupProps<Country, false, GroupBase<Country>>>; ... 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

defaultInputValue

Description
No description.
Typestring

defaultMenuIsOpen

Description
No description.
Typeboolean

defaultValue

Description
No description.
TypeCountry | MultiValue<Country>

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<Country>, inputValue: string) => boolean

form

Description

Sets the form attribute on the input

Typestring

formatGroupLabel

Description

Formats group labels in the menu as React components

An example can be found in the Replacing builtins documentation.

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

formatOptionLabel

Description
No description.
Type(data: Country, formatOptionLabelMeta: FormatOptionLabelMeta<Country>) => React.ReactNode

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: Country) => string

getOptionValue

Description

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

Type(option: Country) => 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)

Typeboolean

isMulti

Description

Support multiple selected options

Typebooleanfalse

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: Country, selectValue: Options<Country>) => boolean

isOptionSelected

Description

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

Type(option: Country, selectValue: Options<Country>) => 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

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

maxMenuHeight

Description

Maximum height of the menu before scrolling

Typenumber

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
No description.
Type(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: Country, actionMeta: ActionMeta<Country>) => void

onClickPreventDefault

Description
No description.
Typeboolean

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 (Country | GroupBase<Country>)[]

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
No description.
Type((instance: any) => void) | React.RefObject<any>

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<Country, false, GroupBase<Country>>) => 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

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