# ComponentFactoryInterface

> Creates components from semantic config contexts.

[API reference](/docs/api/index.md) › [HTML Core](/docs/extensions/html-core/reference/index.md) › [Factory](/docs/extensions/html-core/reference/factory/index.md) › ComponentFactoryInterface

| interface | `UIAwesome\Html\Core\Factory\ComponentFactoryInterface` |
| --- | --- |
| Source | [`src/Factory/ComponentFactoryInterface.php`](https://github.com/ui-awesome/html-core/blob/main/src/Factory/ComponentFactoryInterface.php#L12) |

Creates components from semantic config contexts.

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`create()`](#method-create) abstract | Creates the component represented by the supplied context. | `ComponentFactoryInterface` |

## Method details

### create() <span id="method-create"></span>

```php
abstract public function create(UIAwesome\Html\Core\Config\ComponentContext $context): object
```

Creates the component represented by the supplied context.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$context` | [`UIAwesome\Html\Core\Config\ComponentContext`](/docs/extensions/html-core/reference/config/componentcontext/index.md) | Semantic component context. |

**Returns**

`object`: Created component instance.