Forms

Select

A select component is an interactive UI element that lets users choose a single option from a list of predefined choices, typically presented in a dropdown menu.

The Expo version of the Select component uses React Native Reanimated to add smooth, animated transitions to the menu.

AA

WCAG 2.1 accessibility compliant

Default

React Native



<Select
  defaultValue=''
  accessibilityLabel='Select music genre'
  accessibilityHint='Opens a list of genre options'
  accessibilityRole='combobox'
  accessibilityState={{ 
    expanded: false, // Use a static value or implement state management
    disabled: false
  }}
  onOpenChange={(open) => {
    // You can implement state management here if needed
    // Example: setIsExpanded(open);
  }}
  accessibilityLiveRegion='polite'
>
  <SelectTrigger
    ref={triggerRef}
    className='w-full tracking-tighter'
    accessibilityRole='button'
    accessibilityLabel='Select music genre dropdown'
    accessibilityHint='Press to open genre options'
  >
    <SelectValue
      className='text-md text-foreground native:text-md'
      placeholder='Select music genre'
      style={styles.Inter}
      accessibilityLabel='No genre selected'
      importantForAccessibility='yes'
    />
  </SelectTrigger>
  <SelectContent
    insets={contentInsets}
    className='w-full mt-2'
    accessibilityRole='menu'
    accessibilityLabel='Genre options'
    accessibilityViewIsModal={true}
  >
    <SelectGroup
      accessibilityRole='radiogroup'
      accessibilityLabel='Music genre options'
    >
      {[
        { label: 'Jazz', value: 'jazz' },
        { label: 'Electronica', value: 'electronica' },
        { label: 'Dub / Experimental', value: 'dub experimental' },
        { label: 'Rock', value: 'rock' },
      ].map((item) => (
        <SelectItem
          key={item.value}
          label={item.label}
          value={item.value}
          style={styles.Inter}
          accessibilityRole='radio'
          accessibilityLabel={item.label}
          accessibilityState={{
            checked: false, // This should be updated based on your state management
            disabled: false,
          }}
          accessibilityHint={`Select ${item.label} as your music genre`}
        >
          {item.label}
        </SelectItem>
      ))}
    </SelectGroup>
  </SelectContent>
</Select>

WCAG 2.1 accessibility checks

1.3.1 Info and Relationships (Level A)

1.4.3 Contrast (Minimum) (Level AA)

2.4.6 Headings and Labels (Level AA)

4.1.2 Name, Role, Value (Level A)

4.1.3 Status Messages (Level AA)

Mobile App Starter Kit

·

©

2025

All rights reserved, Studio Hola.

Mobile App Starter Kit

·

©

2025

All rights reserved, Studio Hola.

Mobile App Starter Kit

·

©

2025

All rights reserved, Studio Hola.