# Single Select Menu
> Input control allowing for choosing single option from searchable options menu.

<Callout variant="tip">

`SingleSelectMenu` is built on top of
[Select Menu](/components/forms/select-menu/select-menu) parts
which provide core functionality of the component.

It is interchangeable with the [native Select component](/components/forms/select), but prettier and more powerful.

</Callout>

## Import

```js
import { SingleSelectMenu } from '@gemini-suite/vera-react';
```

Single Select Menu is a compound component that consists of multiple parts:

- `SingleSelectMenu.Root`: The wrapper that contains all the parts of a select menu and provides context for its children.
- `SingleSelectMenu.Trigger`: The button that toggles the select menu.
- `SingleSelectMenu.Content`: A wrapper for the content to be rendered when the select menu is open. It positions itself by aligning over `SingleSelectMenu.Trigger`.
- `SingleSelectMenu.Clear`: The button that clears the value of select menu.
- `SingleSelectMenu.Item`: A container for select menu's item of choice.
- `SingleSelectMenu.ItemText`: A wrapper around textual part of `SingleSelectMenu.Item`.
- `SingleSelectMenu.ItemIndicator`: A visual cue in form of an icon that is displayed when the item is selected.
- `SingleSelectMenu.Group`: A wrapper for the group of select menu items.
- `SingleSelectMenu.Label`: The component that renders an accessible label of `SingleSelectMenu.Group`.
- `SingleSelectMenu.Separator`: The component that renders a horizontal divider between menu items and groups.

## Examples

### Basic

<Callout variant="tip">

Provide `placeholder` prop when the select input does not have an initial value.

</Callout>

<Callout variant="tip">

`SingleSelectMenu` has built in typeahead behavior, meaning pressing the letter <Kbd>B</Kbd> will jump to and highlight the word "Banana" in the example below.

</Callout>

```jsx
<SingleSelectMenu.Root>
  <SingleSelectMenu.Trigger aria-label="Fruit" placeholder="Pick a fruit…" />
  <SingleSelectMenu.Content>
    <SingleSelectMenu.Item value="apple">{'Apple'}</SingleSelectMenu.Item>
    <SingleSelectMenu.Item value="banana">{'Banana'}</SingleSelectMenu.Item>
    <SingleSelectMenu.Item value="orange">{'Orange'}</SingleSelectMenu.Item>
  </SingleSelectMenu.Content>
</SingleSelectMenu.Root>
```

### With a default value

When using `SingleSelectMenu` in "uncontrolled" mode, you can specify the default selected option with `defaultValue` property.

```jsx
<SingleSelectMenu.Root defaultValue="white">
  <SingleSelectMenu.Trigger />
  <SingleSelectMenu.Content>
    <SingleSelectMenu.Item value="white">{'White'}</SingleSelectMenu.Item>
    <SingleSelectMenu.Item value="red">{'Red'}</SingleSelectMenu.Item>
    <SingleSelectMenu.Item value="green">{'Green'}</SingleSelectMenu.Item>
    <SingleSelectMenu.Item value="purple">{'Purple'}</SingleSelectMenu.Item>
  </SingleSelectMenu.Content>
</SingleSelectMenu.Root>
```

### Controlled

You can easily make the `SingleSelectMenu` controlled, by passing your own state to `value` prop. `onValueChange` handler is called when
the selected value changes, allowing you to sync state.

```jsx
() => {
  const [value, setValue] = React.useState('apple');

  return (
    <Flex flow="column">
      <SingleSelectMenu.Root value={value} onValueChange={setValue}>
        <SingleSelectMenu.Trigger />
        <SingleSelectMenu.Content>
          <SingleSelectMenu.Item value="apple">{'Apple'}</SingleSelectMenu.Item>
          <SingleSelectMenu.Item value="banana">
            {'Banana'}
          </SingleSelectMenu.Item>
          <SingleSelectMenu.Item value="orange">
            {'Orange'}
          </SingleSelectMenu.Item>
        </SingleSelectMenu.Content>
      </SingleSelectMenu.Root>
      <Text>Selected value: {value}</Text>
    </Flex>
  );
};
```

### With a clear button

Use `SingleSelectMenu.Clear` part to render a button that clears the value of the select menu.
Focus will automatically move back to the select menu trigger after the value is cleared.

```jsx
<SingleSelectMenu.Root defaultValue="white">
  <SingleSelectMenu.Trigger
    aria-label="Color"
    placeholder="Pick a color…"
    endElement={<SingleSelectMenu.Clear label="Clear" />}
  />
  <SingleSelectMenu.Content>
    <SingleSelectMenu.Item value="white">{'White'}</SingleSelectMenu.Item>
    <SingleSelectMenu.Item value="red">{'Red'}</SingleSelectMenu.Item>
    <SingleSelectMenu.Item value="green">{'Green'}</SingleSelectMenu.Item>
    <SingleSelectMenu.Item value="purple">{'Purple'}</SingleSelectMenu.Item>
  </SingleSelectMenu.Content>
</SingleSelectMenu.Root>
```

### Disabled

The component can use `isDisabled` prop to prevent user from interacting, but also single items can be disabled to limit user's choice.

```jsx
() => {
  const items = ['Carrot', 'Corn', 'Broccoli', 'Tomato', 'Paprika'];

  return (
    <Flex flow="column">
      <SingleSelectMenu.Root isDisabled defaultValue={items[0]}>
        <SingleSelectMenu.Trigger aria-label="Veggies" />
        <SingleSelectMenu.Content>
          {items.map(item => (
            <SingleSelectMenu.Item key={item} value={item}>
              {item}
            </SingleSelectMenu.Item>
          ))}
        </SingleSelectMenu.Content>
      </SingleSelectMenu.Root>
      <SingleSelectMenu.Root>
        <SingleSelectMenu.Trigger
          aria-label="Veggies"
          placeholder="I have disabled red veggies"
        />
        <SingleSelectMenu.Content>
          {items.map((item, index) => (
            <SingleSelectMenu.Item
              key={item}
              value={item}
              isDisabled={index >= 3}
            >
              {item}
            </SingleSelectMenu.Item>
          ))}
        </SingleSelectMenu.Content>
      </SingleSelectMenu.Root>
    </Flex>
  );
};
```

### With Form Field

Use [Form Field component](/components/forms/form-field) to enhance `SingleSelectMenu` with: an accessible label, an optional helper text, a feedback message or to show required indicator.

It is recommended to wrap select inputs with [Form Field](/components/forms/form-field) to create a consistent set of accessible form fields.

<Callout variant="tip">

The [Form Field](/components/forms/form-field) automatically generates a unique id that links the `SingleSelectMenu` with the `FormField.Label`.

</Callout>

<Callout variant="important">

When using `SingleSelectMenu` without [Form Field](/components/forms/form-field), be mindful to provide `aria-label` for `SingleSelectMenu.Trigger`.

</Callout>

```jsx
() => {
  const [value, setValue] = React.useState('');

  return (
    <FormField.Root
      as={Flex}
      flow="column"
      isRequired
      validationStatus={!value ? 'error' : undefined}
    >
      <FormField.Label as="div">{'Season'}</FormField.Label>
      <SingleSelectMenu.Root value={value} onValueChange={setValue}>
        <SingleSelectMenu.Trigger
          placeholder="Pick any season"
          endElement={<SingleSelectMenu.Clear label="Clear" />}
        />
        <SingleSelectMenu.Content>
          <SingleSelectMenu.Item value="winter">
            {'Winter'}
          </SingleSelectMenu.Item>
          <SingleSelectMenu.Item value="spring">
            {'Spring'}
          </SingleSelectMenu.Item>
          <SingleSelectMenu.Item value="summer">
            {'Summer'}
          </SingleSelectMenu.Item>
          <SingleSelectMenu.Item value="fall">{'Fall'}</SingleSelectMenu.Item>
        </SingleSelectMenu.Content>
      </SingleSelectMenu.Root>
      <FormField.FeedbackMessage>
        <FormField.FeedbackIcon />
        {'Choosing season is required.'}
      </FormField.FeedbackMessage>
    </FormField.Root>
  );
};
```

### Sizes

`SingleSelectMenu` comes in two size variants: `medium` and `small`, with the `medium` size used by default. All sizes are aligned with sizes of other related components like [Text Input](/components/forms/text-input).

```jsx
<Flex flow="column">
  <FormField.Root as={Flex} flow="column" size="small">
    <FormField.Label as="div">{'Timespan'}</FormField.Label>
    <SingleSelectMenu.Root size="small">
      <SingleSelectMenu.Trigger placeholder="Select timespan" />
      <SingleSelectMenu.Content>
        <SingleSelectMenu.Item value="quarter">
          {'Quarter'}
        </SingleSelectMenu.Item>
        <SingleSelectMenu.Item value="halfHour">
          {'Half hour'}
        </SingleSelectMenu.Item>
        <SingleSelectMenu.Item value="hour">{'Hour'}</SingleSelectMenu.Item>
      </SingleSelectMenu.Content>
    </SingleSelectMenu.Root>
  </FormField.Root>
  <FormField.Root as={Flex} flow="column">
    <FormField.Label as="div">{'Timespan'}</FormField.Label>
    <SingleSelectMenu.Root>
      <SingleSelectMenu.Trigger placeholder="Select timespan" />
      <SingleSelectMenu.Content>
        <SingleSelectMenu.Item value="quarter">
          {'Quarter'}
        </SingleSelectMenu.Item>
        <SingleSelectMenu.Item value="halfHour">
          {'Half hour'}
        </SingleSelectMenu.Item>
        <SingleSelectMenu.Item value="hour">{'Hour'}</SingleSelectMenu.Item>
      </SingleSelectMenu.Content>
    </SingleSelectMenu.Root>
  </FormField.Root>
</Flex>
```

### Customized appearance

`SingleSelectMenu.Trigger` and `SingleSelectMenu.Item` can be decorated with supporting icons or elements using `startElement` and `endElement` props.

```jsx
() => {
  const [value, setValue] = React.useState('');
  const minutes = {
    quarter: 15,
    halfHour: 30,
    hour: 60
  };

  return (
    <ContentBlock max="measureMedium" center={false} gutters="none">
      <FormField.Root as={Flex} flow="column">
        <FormField.Label as="div">{'Timespan'}</FormField.Label>
        <SingleSelectMenu.Root value={value} onValueChange={setValue}>
          <SingleSelectMenu.Trigger
            placeholder="Select timespan"
            startElement={<SvgIcon iconName="time" />}
            endElement={
              minutes[value] && (
                <Label size="small" circular>
                  {minutes[value] + ' min'}
                </Label>
              )
            }
          />
          <SingleSelectMenu.Content>
            <SingleSelectMenu.Item
              value="quarter"
              endElement={
                <Label size="small" circular>
                  {'0.25 h'}
                </Label>
              }
            >
              {'Quarter'}
            </SingleSelectMenu.Item>
            <SingleSelectMenu.Item
              value="halfHour"
              endElement={
                <Label size="small" circular>
                  {'0.5 h'}
                </Label>
              }
            >
              {'Half hour'}
            </SingleSelectMenu.Item>
            <SingleSelectMenu.Item
              value="hour"
              startElement={
                <Tooltip content="Most commonly used">
                  <SvgIcon iconName="star" />
                </Tooltip>
              }
              endElement={
                <Label size="small" circular>
                  {'1 h'}
                </Label>
              }
            >
              {'Hour'}
            </SingleSelectMenu.Item>
          </SingleSelectMenu.Content>
        </SingleSelectMenu.Root>
      </FormField.Root>
    </ContentBlock>
  );
};
```

### Active indicators

When item inside the Single Select Menu is selected its text content is highlighted in bold.
For additional emphasis you may include `SingleSelectMenu.ItemIndicator` to add a visual indicator rendered when the item is selected.

```jsx
() => {
  const [value, setValue] = React.useState('buysell');

  return (
    <ContentBlock max="measureNarrow" center={false} gutters="none">
      <SingleSelectMenu.Root value={value} onValueChange={setValue}>
        <SingleSelectMenu.Trigger
          aria-label="Trading direction"
          placeholder="Select direction"
          endElement={<SingleSelectMenu.Clear label="Clear" />}
        />
        <SingleSelectMenu.Content>
          <SingleSelectMenu.Item
            value="buy"
            startElement={<SingleSelectMenu.ItemIndicator />}
          >
            {'Buy'}
          </SingleSelectMenu.Item>
          <SingleSelectMenu.Item
            value="sell"
            startElement={<SingleSelectMenu.ItemIndicator />}
          >
            {'Sell'}
          </SingleSelectMenu.Item>
          <SingleSelectMenu.Item
            value="buysell"
            startElement={<SingleSelectMenu.ItemIndicator />}
          >
            {'Buy & Sell'}
          </SingleSelectMenu.Item>
          <SingleSelectMenu.Item
            value="none"
            startElement={<SingleSelectMenu.ItemIndicator />}
          >
            {'None'}
          </SingleSelectMenu.Item>
        </SingleSelectMenu.Content>
      </SingleSelectMenu.Root>
    </ContentBlock>
  );
};
```

### Custom render value

By default, `SingleSelectMenu.Trigger` will automatically display the selected item text content.

However you can take control over the rendering by providing a function to the `renderValue` prop. The function receives getter for the selected item. The element returned by this function will be rendered inside the trigger.

```jsx
<Flex css={{ maxWidth: 400 }}>
  <SingleSelectMenu.Root defaultValue="newestUpdate">
    <SingleSelectMenu.Trigger
      aria-label="Sort by"
      renderValue={({ getSelectedItem }) => (
        <Flex gap="spacingXs">
          <Text color="foregroundNeutralSubtle">{'Sort by'}</Text>
          <Text overflowStrategy="truncate">{getSelectedItem().textValue}</Text>
        </Flex>
      )}
    />
    <SingleSelectMenu.Content>
      <SingleSelectMenu.Item value="newestUpdate">
        {'Newest update'}
      </SingleSelectMenu.Item>
      <SingleSelectMenu.Item value="oldestUpdate">
        {'Oldest update'}
      </SingleSelectMenu.Item>
      <SingleSelectMenu.Item value="nameAlpha">
        {'Name A-Z'}
      </SingleSelectMenu.Item>
      <SingleSelectMenu.Item value="nameReverseAlpha">
        {'Name Z-A'}
      </SingleSelectMenu.Item>
    </SingleSelectMenu.Content>
  </SingleSelectMenu.Root>
</Flex>
```

### Groups

Related options can be grouped together using `SingleSelectMenu.Group` with `SingleSelectMenu.Label` as a label for the group.

<Callout variant="tip">
  Notice how overflowing content behaves when there is a long list of select
  menu items.
</Callout>

```jsx
() => {
  const group = {
    Land: ['Cat', 'Dog', 'Tiger', 'Reindeer', 'Raccoon', 'Armadillo'],
    Water: ['Dolphin', 'Flounder', 'Eel'],
    Air: [
      'Falcon',
      'Winged Horse',
      'Owl',
      'Raven',
      'Parrot',
      'Blue jay',
      'Sparrow',
      'Magpie',
      'Pigeon',
      'Canary',
      'Kingfisher',
      'Blackbird',
      'Bald eagle',
      'Hawk',
      'Woodpecker'
    ]
  };

  return (
    <ContentBlock max="measureNarrow" center={false} gutters="none">
      <FormField.Root as={Flex} flow="column">
        <FormField.Label>{'Your favorite animal'}</FormField.Label>
        <SingleSelectMenu.Root>
          <SingleSelectMenu.Trigger
            placeholder="Choose your animal"
            endElement={<SingleSelectMenu.Clear label="Clear" />}
          />
          <SingleSelectMenu.Content>
            {Object.entries(group).map(([name, animals], index) => (
              <React.Fragment key={name}>
                {index !== 0 && <SingleSelectMenu.Separator />}
                <SingleSelectMenu.Group>
                  <SingleSelectMenu.Label>
                    {name} {`(${animals.length})`}
                  </SingleSelectMenu.Label>
                  {animals.map(animal => (
                    <SingleSelectMenu.Item key={animal} value={animal}>
                      {animal}
                    </SingleSelectMenu.Item>
                  ))}
                </SingleSelectMenu.Group>
              </React.Fragment>
            ))}
          </SingleSelectMenu.Content>
        </SingleSelectMenu.Root>
      </FormField.Root>
    </ContentBlock>
  );
};
```

### HTML Form integration

`SingleSelectMenu` automatically uses hidden select part from [Select Menu](/components/forms/select-menu/select-menu) when it's used in the context of an HTML form.

You just need to provide `name` property that will be used when submitting the form.

```jsx
() => {
  const handleSubmit = event => {
    event.preventDefault();
    const formData = new FormData(event.currentTarget);
    const formJson = Object.fromEntries(formData.entries());
    alert(JSON.stringify(formJson));
  };

  return (
    <form onSubmit={handleSubmit}>
      <Flex flow="column">
        <FormField.Root as={Flex} flow="column">
          <FormField.Label>{'Name'}</FormField.Label>
          <TextInput name="name" autoComplete="name" />
        </FormField.Root>
        <FormField.Root as={Flex} flow="column">
          <FormField.Label as="div">{'Country'}</FormField.Label>
          <SingleSelectMenu.Root
            defaultValue="no"
            name="country"
            autoComplete="country"
          >
            <SingleSelectMenu.Trigger />
            <SingleSelectMenu.Content>
              <SingleSelectMenu.Item value="no">
                {'Norway'}
              </SingleSelectMenu.Item>
              <SingleSelectMenu.Item value="de">
                {'Germany'}
              </SingleSelectMenu.Item>
              <SingleSelectMenu.Item value="pl">
                {'Poland'}
              </SingleSelectMenu.Item>
            </SingleSelectMenu.Content>
          </SingleSelectMenu.Root>
        </FormField.Root>
        <Box>
          <Button type="submit">{'Submit'}</Button>
        </Box>
      </Flex>
    </form>
  );
};
```

---

## Accessibility features

<ul>
  <li iconName="check">

Exposed to assistive technology as a [select-only combobox](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/) with a listbox popup using the [WAI ARIA Listbox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/).

  </li>
  <li iconName="check">

Implements proper keyboard support and focus management practices.

  </li>
  <li iconName="check">

Typeahead to allow selecting options by typing text, even without opening the listbox.

  </li>
  <li iconName="check">

Browser autofill integration via a hidden native `<select>` element.

  </li>
</ul>

---

## API Reference

### SingleSelectMenu.Root

| Name               | Type                                | Default  | Description                                                                                                                                                                          | Required |
| ------------------ | ----------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- |
| `value`            | `string`                            |          | The controlled value of the selected item. Use in conjunction with `onValueChange`.                                                                                                  |          |
| `defaultValue`     | `string`                            |          | The value of the item to show as selected when first rendered. Use when you do not need to control the selection state.                                                              |          |
| `onValueChange`    | `(value: string) => void`           |          | Event handler called when the selection state changes.                                                                                                                               |          |
| `isOpen`           | `boolean`                           | `false`  | The controlled open state of the select menu. Use in conjunction with `onIsOpenChange`.                                                                                              |          |
| `defaultIsOpen`    | `boolean`                           |          | The open state of the select menu when it's first rendered. Use when you do not need to control open state.                                                                          |          |
| `onIsOpenChange`   | `(isOpen: boolean) => void`         |          | Event handler called when the open state of the select menu changes.                                                                                                                 |          |
| `size`             | `"small" \| "medium"`               | `medium` | The size of the select menu.                                                                                                                                                         |          |
| `isDisabled`       | `boolean`                           | `false`  | When `true`, the content of select menu can't be opened by user interaction.                                                                                                         |          |
| `isRequired`       | `boolean`                           |          | When `true`, the select menu is marked as required.                                                                                                                                  |          |
| `validationStatus` | `"error" \| "success" \| "warning"` |          | Styles the select menu to match the status.                                                                                                                                          |          |
| `name`             | `string`                            |          | Name attribute of the select element. Useful for form submission.                                                                                                                    |          |
| `autoComplete`     | `string`                            |          | `autoComplete` attribute of the select element. Provides a hint for user agent's [autocomplete feature](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete) . |          |

### SingleSelectMenu.Trigger

| Name           | Type                                                                                                    | Default | Description                                                                                                                                                                                                                                                                                  | Required |
| -------------- | ------------------------------------------------------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `as`           | `keyof JSX.IntrinsicElements \| React.ComponentType<any>`                                               | `div`   | Change the component to a different HTML tag or custom component. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.   For more details, read our [Composition](/get-started/composition#polymorphism) guide. |          |
| `css`          | `StitchesCss`                                                                                           |         | Apply styles directly to a component in a similar way how you would define inline styles. Vera uses [Stitches](https://stitches.dev/) under the hood with a fully-typed API and support for features like tokens, media queries, or variants.                                                |          |
| `startElement` | `React.ReactElement`                                                                                    |         | `ReactElement` to render to the left of the triggers's children.                                                                                                                                                                                                                             |          |
| `endElement`   | `React.ReactElement`                                                                                    |         | `ReactElement` to render to the right of the triggers's children.                                                                                                                                                                                                                            |          |
| `renderValue`  | `({ getSelectedItem: () => SelectMenuValueItem \| undefined; isDisabled: boolean }) => React.ReactNode` |         | Callback function used to override content rendering inside of the trigger.                                                                                                                                                                                                                  |          |

### SingleSelectMenu.Content

| Name             | Type                                                                                                     | Default      | Description                                                                                                                                                                                                                                   | Required |
| ---------------- | -------------------------------------------------------------------------------------------------------- | ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `css`            | `StitchesCss`                                                                                            |              | Apply styles directly to a component in a similar way how you would define inline styles. Vera uses [Stitches](https://stitches.dev/) under the hood with a fully-typed API and support for features like tokens, media queries, or variants. |          |
| `placement`      | `"top" \| "top_left" \| "top_right" \| "bottom" \| "bottom_left" \| "bottom_right" \| "left" \| "right"` | `"bottom"`   | Placement of the content being positioned on.                                                                                                                                                                                                 |          |
| `anchorOffset`   | `number`                                                                                                 |              | Distance from the anchor to the element being positioned.                                                                                                                                                                                     |          |
| `onExitComplete` | `() => void`                                                                                             | `() => void` | Event handler called when the content has completed animating out.                                                                                                                                                                            |          |

### SingleSelectMenu.Clear

| Name    | Type          | Default | Description                                                                                                                                                                                                                                   | Required |
| ------- | ------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `css`   | `StitchesCss` |         | Apply styles directly to a component in a similar way how you would define inline styles. Vera uses [Stitches](https://stitches.dev/) under the hood with a fully-typed API and support for features like tokens, media queries, or variants. |          |
| `label` | `string`      |         | The `aria-label` of the button to use for screen readers.                                                                                                                                                                                     | Yes      |

### SingleSelectMenu.Item

| Name           | Type                                                      | Default | Description                                                                                                                                                                                                                                                                                  | Required |
| -------------- | --------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `as`           | `keyof JSX.IntrinsicElements \| React.ComponentType<any>` | `div`   | Change the component to a different HTML tag or custom component. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.   For more details, read our [Composition](/get-started/composition#polymorphism) guide. |          |
| `css`          | `StitchesCss`                                             |         | Apply styles directly to a component in a similar way how you would define inline styles. Vera uses [Stitches](https://stitches.dev/) under the hood with a fully-typed API and support for features like tokens, media queries, or variants.                                                |          |
| `value`        | `string`                                                  |         | The value of the select menu item.                                                                                                                                                                                                                                                           | Yes      |
| `isDisabled`   | `boolean`                                                 |         | When `true`, the item will be disabled, preventing the user from interacting with it.                                                                                                                                                                                                        |          |
| `textValue`    | `string`                                                  |         | By default the typeahead behavior will use the `textContent` of the `SingleSelectMenu.ItemText`. When the content is complex or non-textual, this property can be used to specify optional text for the typeahead search purposes.                                                           |          |
| `startElement` | `React.ReactElement`                                      |         | `ReactElement` to render to the left of the item's children.                                                                                                                                                                                                                                 |          |
| `endElement`   | `React.ReactElement`                                      |         | `ReactElement` to render to the right of the item's children.                                                                                                                                                                                                                                |          |

### SingleSelectMenu.ItemText

| Name | Type                                                      | Default | Description                                                                                                                                                                                                                                                                                  | Required |
| ---- | --------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `as` | `keyof JSX.IntrinsicElements \| React.ComponentType<any>` | `span`  | Change the component to a different HTML tag or custom component. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.   For more details, read our [Composition](/get-started/composition#polymorphism) guide. |          |

### SingleSelectMenu.ItemIndicator

| Name  | Type                                                      | Default | Description                                                                                                                                                                                                                                                                                  | Required |
| ----- | --------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `as`  | `keyof JSX.IntrinsicElements \| React.ComponentType<any>` | `div`   | Change the component to a different HTML tag or custom component. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.   For more details, read our [Composition](/get-started/composition#polymorphism) guide. |          |
| `css` | `StitchesCss`                                             |         | Apply styles directly to a component in a similar way how you would define inline styles. Vera uses [Stitches](https://stitches.dev/) under the hood with a fully-typed API and support for features like tokens, media queries, or variants.                                                |          |

### SingleSelectMenu.Group

| Name  | Type                                                      | Default | Description                                                                                                                                                                                                                                                                                  | Required |
| ----- | --------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `as`  | `keyof JSX.IntrinsicElements \| React.ComponentType<any>` | `div`   | Change the component to a different HTML tag or custom component. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.   For more details, read our [Composition](/get-started/composition#polymorphism) guide. |          |
| `css` | `StitchesCss`                                             |         | Apply styles directly to a component in a similar way how you would define inline styles. Vera uses [Stitches](https://stitches.dev/) under the hood with a fully-typed API and support for features like tokens, media queries, or variants.                                                |          |

### SingleSelectMenu.Label

| Name  | Type                                                      | Default | Description                                                                                                                                                                                                                                                                                  | Required |
| ----- | --------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `as`  | `keyof JSX.IntrinsicElements \| React.ComponentType<any>` | `div`   | Change the component to a different HTML tag or custom component. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.   For more details, read our [Composition](/get-started/composition#polymorphism) guide. |          |
| `css` | `StitchesCss`                                             |         | Apply styles directly to a component in a similar way how you would define inline styles. Vera uses [Stitches](https://stitches.dev/) under the hood with a fully-typed API and support for features like tokens, media queries, or variants.                                                |          |

### SingleSelectMenu.Separator

| Name  | Type                                                      | Default | Description                                                                                                                                                                                                                                                                                  | Required |
| ----- | --------------------------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- |
| `as`  | `keyof JSX.IntrinsicElements \| React.ComponentType<any>` | `div`   | Change the component to a different HTML tag or custom component. This will merge the original component props with the props of the supplied element/component and change the underlying DOM node.   For more details, read our [Composition](/get-started/composition#polymorphism) guide. |          |
| `css` | `StitchesCss`                                             |         | Apply styles directly to a component in a similar way how you would define inline styles. Vera uses [Stitches](https://stitches.dev/) under the hood with a fully-typed API and support for features like tokens, media queries, or variants.                                                |          |
