Skip to content

density

How much room the calendar’s rows and paddings take.

Type'compact' | 'comfortable' | 'spacious'
Default'comfortable'
Live update (update())Yes
Declared inpackages/dom/src/calendar.ts

'compact', 'comfortable' (the default) or 'spacious': an hour of a time grid is 48, 72 or 96 px tall, and the height of the bars and the day heads, the month’s weeks and the type size follow. A narrow side panel takes compact, a wall screen spacious. --dz-minute (the pixels of a minute) and the other --dz-* variables set any other size — on .dz-cal itself, since a density sets them there.

import { createCalendar } from '@dzcalendar/dom';
createCalendar(element, { timeZone: 'Europe/Paris', density: 'compact' });

In the frameworks it is an Angular input (density) and a React and Vue prop (density, density).

The week, compact: an hour 48 px tall.