# Coveo Recommendation Component (CoveoRecommendation)

## Index

### Methods

- attachComponent
- debugInfo
- detachComponent
- detachComponentsInside
- disable
- enable
- getBindings
- getComponents
- getQueryContext

### Properties

- disabled
- logger
- responsiveComponents
- ID

### Component Options

- dropdownHeaderLabel
- enableResponsiveMode
- hideIfNoResults
- id
- mainSearchInterface
- optionsToUse
- responsiveBreakpoint
- sendActionsHistory
- userContext

### Constructors

- constructor

## Methods

### attachComponent

- attachComponent(type: string, component: BaseComponent): void

- Inherited from SearchInterface.attachComponent

  - Defined in ui/SearchInterface/SearchInterface.ts :617

  #### Parameters

  - ##### type: string

  - ##### component: BaseComponent

  #### Returns void

### debugInfo

- debugInfo(): any

- Inherited from BaseComponent.debugInfo

  - Defined in ui/Base/BaseComponent.ts :41

  #### Returns any

### detachComponent

- detachComponent(type: string, component: BaseComponent): void

- Inherited from SearchInterface.detachComponent

  - Defined in ui/SearchInterface/SearchInterface.ts :627

  #### Parameters

  - ##### type: string

  - ##### component: BaseComponent

  #### Returns void

### detachComponentsInside

- detachComponentsInside(element: HTMLElement): void

- Inherited from SearchInterface.detachComponentsInside

  - Defined in ui/SearchInterface/SearchInterface.ts :714

  #### Parameters

  - ##### element: HTMLElement

  #### Returns void

### disable

- disable(): void

- Inherited from BaseComponent.disable

  - Defined in ui/Base/BaseComponent.ts :52

  #### Returns void

### enable

- enable(): void

- Inherited from BaseComponent.enable

  - Defined in ui/Base/BaseComponent.ts :61

  #### Returns void

### getBindings

- getBindings(): object

- Inherited from SearchInterface.getBindings

  - Defined in ui/SearchInterface/SearchInterface.ts :639

  #### Returns object

### getComponents

- getComponents<T>(type: string): T[]

- Inherited from SearchInterface.getComponents

  - Defined in ui/SearchInterface/SearchInterface.ts :693

  #### Type parameters

  - #### T

  #### Parameters

  - ##### type: string

  #### Returns T[]

### getQueryContext

- getQueryContext(): Context

- Inherited from SearchInterface.getQueryContext

  - Defined in ui/SearchInterface/SearchInterface.ts :665

  #### Returns Context

## Properties

### disabled

disabled: boolean

Inherited from BaseComponent.disabled

- Defined in ui/Base/BaseComponent.ts :23

### logger

logger: Logger

Inherited from BaseComponent.logger

- Defined in ui/Base/BaseComponent.ts :18

### responsiveComponents

responsiveComponents: ResponsiveComponents

Inherited from SearchInterface.responsiveComponents

- Defined in ui/SearchInterface/SearchInterface.ts :528

### Static ID

ID: string

Inherited from BaseComponent.ID

- Defined in ui/Base/BaseComponent.ts :28

## Component Options

### dropdownHeaderLabel

dropdownHeaderLabel: string

- Defined in ui/Recommendation/Recommendation.ts :196

Markup configuration example(s) :

    data-dropdown-header-label='foo'

### enableResponsiveMode

enableResponsiveMode: boolean

- Defined in ui/Recommendation/Recommendation.ts :169

Markup configuration example(s) :

    data-enable-responsive-mode='true'
    data-enable-responsive-mode='false'

### hideIfNoResults

hideIfNoResults: boolean

- Defined in ui/Recommendation/Recommendation.ts :146

Markup configuration example(s) :

    data-hide-if-no-results='true'
    data-hide-if-no-results='false'

### id

id: string

- Defined in ui/Recommendation/Recommendation.ts :100

Markup configuration example(s) :

    data-id='foo'

### mainSearchInterface

mainSearchInterface: HTMLElement

- Defined in ui/Recommendation/Recommendation.ts :85

### optionsToUse

optionsToUse: string[] | ("expression" | "advancedExpression" | "constantExpression" | "disjunctionExpression")[]

- Defined in ui/Recommendation/Recommendation.ts :119

### responsiveBreakpoint

responsiveBreakpoint: number

- Defined in ui/Recommendation/Recommendation.ts :185

Markup configuration example(s) :

    data-responsive-breakpoint='10'

### sendActionsHistory

sendActionsHistory: boolean

- Defined in ui/Recommendation/Recommendation.ts :135

Markup configuration example(s) :

    data-send-actions-history='true'
    data-send-actions-history='false'

### userContext

userContext: IStringMap<any>

- Defined in ui/Recommendation/Recommendation.ts :91

## Constructors

### constructor

- new Recommendation(element: HTMLElement, options?: IRecommendationOptions, analyticsOptions?: object, _window?: Window): Recommendation

- Overwrites SearchInterface.constructor

  - Defined in ui/Recommendation/Recommendation.ts :206

  #### Parameters

  - ##### element: HTMLElement

  - ##### Default value options: IRecommendationOptions = {}

  - ##### Default value analyticsOptions: object = {}

  - ##### Default value _window: Window = window

  #### Returns Recommendation

### Implements

- IComponentBindings
- IComponentBindings