# Building Blocks

The Card allows you to build a wide variety of layouts and tailor the component to specific requirements.

## Card Elements and Containers

Each card consists of content building blocks which are related to a single subject and provide
clarity and categorization for presenting the content in an attractive way.

The building blocks of the Card component are the following:

* (Required) [kendo-card](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardcomponent)
* (Optional) [kendo-card-header](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardheadercomponent)—The Header helps you to render a better structure and is responsible for aligning the content that is passed to it.
* (Optional) [kendo-card-body](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardbodycomponent)—The Body provides control over the full layout of the component.
* (Optional) [kendo-card-actions](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardactionscomponent)—The Actions element specifies various user actions such as clicking buttons or links.
* (Optional) [kendo-card-footer](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardfootercomponent)—The Footer helps you to render a better structure and is responsible for aligning the content that is passed to it.
* (Optional) [kendoCardSeparator](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardseparatordirective)—The Separator creates a visual separation of the card content.
* (Optional) [kendoCardMedia](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardmediadirective)—The Media shows images or media in cards and can be optionally used as a container.
* (Optional) [kendoCardTitle](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardtitledirective)—The Title adds styles to the headers.
* (Optional) [kendoCardSubtitle](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardsubtitledirective)—The Subtitle adds styles to sub-header texts and additional information.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/card/building_blocks/overview/source.txt)

## Creating a Basic Card

This section represents a step-by-step guide for creating the card from the previous example.

### Adding the Card and the Header

1. Add the [Card](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardcomponent) component.
2. Add the [Header](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardheadercomponent) component to the Card and pass it the desired contents.
3. To specify whether the direction of the content is horizontal or vertical, add one of the `k-hstack` or `k-vstack` classes to the [Header](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardheadercomponent) or to any other container element of the Card.
4. To style the text, add the [`kendoCardTitle`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardtitledirective) and [`kendoCardSubtitle`](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardsubtitledirective) directives.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/card/building_blocks/card_header/source.txt)

### Adding the Body and the Media

The following example demonstrates how to add the Body and Media directives as well as to set the orientation of the Card separator.

The Card [Body](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardbodycomponent) provides a container for adding and aligning any content inside the card. The Card [Media](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardmediadirective) directive aligns any media that is displayed on the Card. Depending on the desired [orientation](https://www.telerik.com/kendo-angular-ui-develop/components/layout/card/orientation), the [Separator](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardseparatordirective) can be either vertical or horizontal.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/card/building_blocks/body_media/source.txt)

### Adding the Action Buttons

You can add action buttons inside the Card [Actions](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardactionscomponent) container and then you can specify their orientation and layout. For more information, refer to the [article on the action buttons of the Card](https://www.telerik.com/kendo-angular-ui-develop/components/layout/card/action_buttons).

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/card/building_blocks/actions/source.txt)

### Adding the Footer and the Remaining Styles

The following example demonstrates how to add the Card Footer and then fine-tune the styling of the component.

[Demo Source](https://demos.telerik.com/kendo-angular-ui/demos/layout/card/building_blocks/footer/source.txt)

## Suggested Links

* [API Reference of the Card](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardcomponent)
* [API Reference of the Card Header](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardheadercomponent)
* [API Reference of the Card Body](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardbodycomponent)
* [API Reference of the Card Footer](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardfootercomponent)
* [API Reference of the Card Actions](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardactionscomponent)
* [API Reference of the Card Separator](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardseparatordirective)
* [API Reference of the Card Media](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardmediadirective)
* [API Reference of the Card Title](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardtitledirective)
* [API Reference of the Card Subtitle](https://www.telerik.com/kendo-angular-ui-develop/components/layout/api/cardsubtitledirective)
