## `<w-select>` API

Unless otherwise noted all properties are HTML attributes (as opposed to JavaScript object properties).

### Properties

| Name | Type | Default | Summary |
|-|-|-|-|
| always | `boolean` | `false` | Whether to always show a hint. **Deprecated**: Use `help-text` instead and only set it if you want to display the help text. |
| auto-focus | `boolean` | `false` | Whether the element should receive focus on render. **Deprecated**: Use the native `autofocus` attribute instead. |
| autofocus | `boolean` | `false` | Whether the element should receive focus on render |
| disabled | `boolean` | `false` | Renders the field in a disabled state. |
| help-text | `string \| undefined` | `-` | The content displayed as the help text. |
| helpTextSlotChange (JS only) | `helpTextSlotChange() => void` | `-` | - |
| hint | `string \| undefined` | `-` | The content displayed as the help text. **Deprecated**: Use `help-text` instead. |
| invalid | `boolean` | `false` | Renders the field in an invalid state. |
| label | `string \| undefined` | `-` | The content to display as the label. |
| name | `string \| undefined` | `-` | The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the select when submitting the form. |
| optional | `boolean` | `false` | Whether to show the optional indicator after the label. |
| read-only | `boolean` | `false` | Renders the field in a readonly state. **Deprecated**: Use the native readonly attribute instead. |
| readonly | `boolean` | `false` | Renders the field in a readonly state. |
| tooltip | `string \| undefined` | `-` | Supplementary information that should show in a tooltip behind an information icon after the label. |
| value | `string \| undefined` | `-` | Lets you set the current value. |

### Property Details

#### always

**Deprecated**: Use `help-text` instead and only set it if you want to display the help text.

Whether to always show a hint.

- Type: `boolean`
- Default: `false`

#### auto-focus

**Deprecated**: Use the native `autofocus` attribute instead.

Whether the element should receive focus on render.

- Type: `boolean`
- Default: `false`

#### autofocus

Whether the element should receive focus on render

- Type: `boolean`
- Default: `false`

#### disabled

Renders the field in a disabled state.

- Type: `boolean`
- Default: `false`

#### help-text

The content displayed as the help text.

Paired with `invalid` to show the text as a validation error.

- Type: `string | undefined`
- Default: `-`

#### helpTextSlotChange (JS only)



- Type: `helpTextSlotChange() => void`
- Default: `-`

#### hint

**Deprecated**: Use `help-text` instead.

The content displayed as the help text.

- Type: `string | undefined`
- Default: `-`

#### invalid

Renders the field in an invalid state.

Paired with `help-text` to provide feedback about the error.

- Type: `boolean`
- Default: `false`

#### label

The content to display as the label.

- Type: `string | undefined`
- Default: `-`

#### name

The [name](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/input#name) of the select when submitting the form.

- Type: `string | undefined`
- Default: `-`

#### optional

Whether to show the optional indicator after the label.

- Type: `boolean`
- Default: `false`

#### read-only

**Deprecated**: Use the native readonly attribute instead.

Renders the field in a readonly state.

- Type: `boolean`
- Default: `false`

#### readonly

Renders the field in a readonly state.

- Type: `boolean`
- Default: `false`

#### tooltip

Supplementary information that should show in a tooltip behind an information icon after the label.

You must provide a label to be able to show an info icon with a tooltip.

- Type: `string | undefined`
- Default: `-`

#### value

Lets you set the current value.

- Type: `string | undefined`
- Default: `-`

### Events

#### change



- Type: `CustomEvent`


