# ComponentContent

Learn how to type component content in your JavaScript application.

This type resolves the content type for a versioned [Component](/explanation/component) ID.

## Signature

This type has the following signature:

```ts
type ComponentContent<I extends VersionedComponentId>
```

## Usage

Pass a versioned component ID like `'card@1'` to get the corresponding content type. This is useful when multiple slots reference the same component and you need shared rendering logic:

```tsx
import type {ComponentContent} from '@croct/plug';

type CardProps = ComponentContent<'card@1'>;

export function Card(props: CardProps) {
return <div>{props.title}</div>;
}
```

When using [CLI-generated types](/reference/cli/type-generation), the type parameter is constrained to known component IDs, providing autocompletion and type safety.
