import { Meta, Canvas, Controls, ArgsTable } from '@storybook/addon-docs/blocks'
import * as SelectStories from './select.stories'

<Meta title="pv-form/NaturalLanguageForm/NaturalLanguageSelect" />

# NaturalLanguageSelect

Select component for natural language forms. [Design specification](https://design.planview.com/components/forms/natural-language-form/anatomy#interactive-text-menu-trigger).

```ts
import { NaturalLanguageSelect } from '@planview/pv-form'
```

This component is a cross between [Combobox](/docs/pv-uikit-combobox--docs) and [NaturalLanguageDropdownMenu](/docs/pv-form-naturallanguageform-naturallanguagedropdownmenu--docs), though it shares much of the same API as `NaturalLanguageDropdownMenu`. The main difference is this is a closed component that can be configured similar to `Combobox` by passing a `value` or `defaultValue`, `onChange`, and `options`. This should work for most natural language forms, but you can always switch to using `NaturalLanguageDropdownMenu` directly if you need more control.

<Canvas of={SelectStories.Default} />

## Props unique to `NaturalLanguageSelect`

<Controls
    of={SelectStories.Default}
    include={['value', 'defaultValue', 'placeholder', 'options', 'onChange']}
/>

## Props inherited from `NaturalLanguageDropdownMenu`, `DropdownMenu`, and `Menu`

<Controls
    of={SelectStories.Default}
    exclude={['value', 'defaultValue', 'placeholder', 'options', 'onChange']}
/>
