# Auto Item Height

The KendoReact `SchedulerViewSlot` can automatically extend depending on the content inside it, or take a predefined `height`.

This feature is available in `horizontal` configuration of the events, which can be observed in the following views:

* `TimelineView`
* `DayView`— only in the `allDay` section.
* `Week`— only in the `allDay` section.
* `WorkWeek`— only in the `allDay` section.
* `MonthView`

> This feature is compatible with the [Adaptive Slot Height](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/adaptive-slot-height) of the `SchedulerViewSlot`.

In order to set enable the auto item height functionality, set the [`style.height`](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/schedulerviewitemprops#style) property of the `SchedulerViewItem` to `auto`:

```jsx
const AutoHeightViewItem = (props) => {
    return (
        <SchedulerViewItem
            {...props}
            style={{
                // Keep the positioning styles the view passes to the item.
                ...props.style,
                height: 'auto'
            }}
        />
    );
};
```

The following example demonstrates the `auto` item height feature in action:

[Demo Source](https://demos.telerik.com/kendo-react-ui/scheduler/auto-item-height/overview/func/source.txt)

## Constant Item Height

In order to set a `constant` height of an item, set its `style.height` to a numeric value, representing the height in pixels:

```jsx
const AutoHeightViewItem = (props) => {
    return (
        <SchedulerViewItem
            {...props}
            style={{
                ...props.style,
                height: 45
            }}
        />
    );
};
```

The following example demonstrates `constant` item height in action:

[Demo Source](https://demos.telerik.com/kendo-react-ui/scheduler/auto-item-height/constant/func/source.txt)

## Suggested Links

* [API Reference of the Scheduler](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/api/scheduler)
* [Scheduler Slot Customization](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/customization/slots)
* [Scheduler Item Customization](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/customization/items)
* [Adaptive Slot Height](https://www.telerik.com/kendo-react-ui-develop/components/scheduler/adaptive-slot-height)
* [KendoReact Scheduler](https://www.telerik.com/kendo-react-ui/components/scheduler/)
