# Components

Learn how to reference the content type of a component.

This interface holds a named content type for each [Component](/explanation/component), generated by the [CLI](/reference/cli/type-generation) in the `Croct\Content` namespace. Each type is named after its component in PascalCase, where the bare name resolves to the latest version and a `V<major>` suffix targets a specific major.

## Example

Supposing you have a component named `card` with versions 1 and 2, this interface exposes `Card` for the latest version (currently version 2), `CardV1` for version 1, and `CardV2` for version 2.

To annotate your own code, import a type with [`@phpstan-import-type`](https://phpstan.org/writing-php-code/phpdoc-types#local-type-aliases) and [`@psalm-import-type`](https://psalm.dev/docs/annotating_code/supported_annotations/#psalm-import-type):

```php
<?php
/**
 * @phpstan-import-type Card from \Croct\Content\Components
 * @psalm-import-type Card from \Croct\Content\Components
 */
final class CardView
{
    /** @var Card */
    public array $card;
}
```
