hour-view

CSS subgrid container for calendar events within a single hour slot. Provides half-hour positioning and double-booking layout.

Overview

The <hour-view> element is a CSS-only container that holds <calendar-event> elements within a single hour slot. It uses CSS subgrid to inherit its parent's two-row half-hour grid, allowing events to be placed at the top (:00) or bottom (:30) of the hour.

Half-Hour Positioning

Each <hour-view> provides two subgrid rows (top half and bottom half of the hour). Events at :00 go in row 1; events with data-start="30" go in row 2.

Double-Booking

Add data-overlap to display multiple events side by side when two events occupy the same time slot.

Without data-overlap, events stack vertically. With it, the grid switches to 1fr 1fr columns.

Attributes

AttributeTypeDescription
data-overlap boolean Enable side-by-side layout for double-booked events.

Empty Hours

Empty <hour-view> elements render as blank rows in the grid — this is correct behavior showing available time slots.

Related