# Interface IComponentOptionsListOptionArgs

The `IComponentOptionsListOptionArgs` interface describes the available parameters when building a [list option]{@link ComponentOptions.buildListOption).

## Index

### Properties

- alias
- attrName
- defaultFunction
- defaultValue
- depend
- deprecated
- postProcessing
- required
- section
- separator
- validator
- values

## Properties

### Optional alias

alias: string | string[]

Inherited from IComponentOptions.alias

- Defined in ui/Base/IComponentOptions.ts :117

Specifies an alias, or array of aliases, which can be used instead of the actual option name.

Note:

> This can be useful to modify an option name without introducing a breaking change.

### Optional attrName

attrName: string

Inherited from IComponentOptions.attrName

- Defined in ui/Base/IComponentOptions.ts :108

Specifies a different markup name to use for an option, rather than the standard name (i.e., `data-` followed by the hyphened name of the option).

Note:

> This should only be used for backward compatibility reasons.

### Optional defaultFunction

defaultFunction: function

Inherited from IComponentOptions.defaultFunction

- Defined in ui/Base/IComponentOptions.ts :76

Specifies a function that should return the value the option must take when no other value is explicitly specified.

param

  The HTMLElement on which the current option is being parsed.

returns

  The default value of the option.

#### Type declaration

- - (element: HTMLElement): string[]

  - #### Parameters

    - ##### element: HTMLElement

    #### Returns string[]

### Optional defaultValue

defaultValue: string[]

Inherited from IComponentOptions.defaultValue

- Defined in ui/Base/IComponentOptions.ts :68

Specifies the value the option must take when no other value is explicitly specified.

### Optional depend

depend: string

Inherited from IComponentOptions.depend

- Defined in ui/Base/IComponentOptions.ts :132

Specifies the name of a boolean component option which must be `true` in order for this option to function properly.

Note:

> This is mostly useful for the Coveo JavaScript Interface Editor.

### Optional deprecated

deprecated: string

Inherited from IComponentOptions.deprecated

- Defined in ui/Base/IComponentOptions.ts :144

Specifies a message that labels the option as deprecated. This message appears in the console upon initialization if the deprecated option is used in the page. Consequently, this message should explain as clearly as possible why the option is deprecated, and what now replaces it.

Note:

> Deprecated options do not appear in the Coveo JavaScript Interface Editor.

### Optional postProcessing

postProcessing: IComponentOptionsPostProcessing<string[]>

Inherited from IComponentOptions.postProcessing

- Defined in ui/Base/IComponentOptions.ts :98

Specifies a function that should allow a component option to further modify its own value once all other options of that component have been built.

Example:

> By default, the `id` option of the `Facet` component uses a post processing function to set its value to that of the `field` option.

### Optional required

required: boolean

Inherited from IComponentOptions.required

- Defined in ui/Base/IComponentOptions.ts :87

Specifies whether it is necessary to explicitly specify a value for the option in order for the component to function properly.

Example:

> The `field` option of the `Facet` component is required, since a facet cannot function properly without a field.

### Optional section

section: string

Inherited from IComponentOptions.section

- Defined in ui/Base/IComponentOptions.ts :122

Specifies a section name inside which the option should appear in the Coveo JavaScript Interface Editor.

### Optional separator

separator: RegExp

- Defined in ui/Base/IComponentOptions.ts :196

Specifies the regular expression to use to separate the elements of the list option.

Default value is a regular expression that inserts a comma character (`,`) between each word.

### Optional validator

validator: function

Inherited from IComponentOptions.validator

- Defined in ui/Base/IComponentOptions.ts :152

Specifies a function that should indicate whether the option value is valid.

param

  The option value to validate.

returns

  `true` if the option value is valid; `false` otherwise.

#### Type declaration

- - (value: string[]): boolean

  - #### Parameters

    - ##### value: string[]

    #### Returns boolean

### Optional values

values: any

- Defined in ui/Base/IComponentOptions.ts :201

Specifies the possible values the list option elements can take.

### Hierarchy

- IComponentOptions<string[]>