# Interface IComponentDefinition

Definition for a Component.

## Index

### Properties

- ID
- className
- doExport
- fields
- options
- parent

### Constructors

- constructor

## Properties

### ID

ID: string

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

The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

### Optional className

className: string

- Defined in ui/Base/Component.ts :34

The generated `className` for this component.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton

### Optional doExport

doExport: function

- Defined in ui/Base/Component.ts :38

Function that can be called to export one or multiple module in the global scope.

#### Type declaration

- - (): void

  - #### Returns void

### Optional fields

fields: string[]

- Defined in ui/Base/Component.ts :58

The optional index fields that the component possess or display.

### Optional options

options: any

- Defined in ui/Base/Component.ts :50

The available options for the component.

### Optional parent

parent: IComponentDefinition

- Defined in ui/Base/Component.ts :54

The optional parent of the component, which will be a component itself.

## Constructors

### constructor

- new IComponentDefinition(element: HTMLElement, options: any, bindings: IComponentBindings, ...args: any[]): Component

- - Defined in ui/Base/Component.ts :38

  Constructor for each component

  #### Parameters

  - ##### element: HTMLElement

    The HTMLElement on which the component will instantiate.

  - ##### options: any

    The available options for the component.

  - ##### bindings: IComponentBindings

    The bindings (or environment) for the component.For exemple, the QueryController or SearchInterface. Optional, if not provided, the component will resolve those automatically. This has a cost on performance, though, since it has to traverses it's parents to find the correct elements.

  - ##### Rest ...args: any[]

    Optional arguments, depending on the component type. For example, ResultComponent will receive the result there.

  #### Returns Component

### Hierarchy

- IComponentDefinition