Vivid API

Calendar

The Calendar component displays events in a visual date grid in a week views, allowing users to view and interact with the displayed events.

Usage

import { VCalendar } from '@vonage/vivid-api-vue';
import { registerCalendar } from '@vonage/vivid-api';
registerCalendar('your-prefix');

CSS Variables

Calendar Column / Header Background Color

When using sticky-mode (header, column, or both), set the CSS variable --calendar-column-background-color to define the background color of sticky elements.

If not specified, it defaults to --vvd-color-canvas.

Slots

Day[0-6] Slots

Each day in the Calendar has a slot assigned to it. Use the Calendar Event component in these slots to arrange events around the weekly view.

API Reference

calendar

Properties

PropertyTypeDefaultDescription
datetimestring | DateSets the week to display
hour12booleanDisplays a time in 12 hour format
localesstring | string[]Sets the locale to be displayed
startDay'sunday' | 'monday'Sets the first day of the week to display
stickyMode'none' | 'header' | 'column' | 'all'Set the `sticky-mode` attribute
PropertyTypeDefaultDescription
datetimestring | DateSets the week to display
hour12booleanDisplays a time in 12 hour format
localesstring | string[]Sets the locale to be displayed
start-day'sunday' | 'monday'Sets the first day of the week to display
sticky-mode'none' | 'header' | 'column' | 'all'Set the `sticky-mode` attribute

Slots

NameDescription
day-0Assign elements to corresponding day column using this slot.
day-1Assign elements to corresponding day column using this slot.
day-2Assign elements to corresponding day column using this slot.
day-3Assign elements to corresponding day column using this slot.
day-4Assign elements to corresponding day column using this slot.
day-5Assign elements to corresponding day column using this slot.
day-6Assign elements to corresponding day column using this slot.
defaultDefault slot.
NameDescription
day-0Assign elements to corresponding day column using this slot.
day-1Assign elements to corresponding day column using this slot.
day-2Assign elements to corresponding day column using this slot.
day-3Assign elements to corresponding day column using this slot.
day-4Assign elements to corresponding day column using this slot.
day-5Assign elements to corresponding day column using this slot.
day-6Assign elements to corresponding day column using this slot.
defaultDefault slot.

calendar-event

Properties

PropertyTypeDefaultDescription
appearance'filled' | 'duotone' | 'subtle'Sets the event's appearance
connotation'alert' | 'accent' | 'cta' | 'success' | 'warning' | 'information' | 'announcement'Sets the first day of the week to display
descriptionstringSets the event description
durationnumberSets the event duration (e.g. `2` = 2 hours)
headingstringSets the event heading
overlapCountnumberSets the stacking context of the event when it overlaps with another
startnumberSets the event start time (e.g. `14` = 2pm)
PropertyTypeDefaultDescription
appearance'filled' | 'duotone' | 'subtle'Sets the event's appearance
connotation'alert' | 'accent' | 'cta' | 'success' | 'warning' | 'information' | 'announcement'Sets the first day of the week to display
descriptionstringSets the event description
durationnumberSets the event duration (e.g. `2` = 2 hours)
headingstringSets the event heading
overlap-countnumberSets the stacking context of the event when it overlaps with another
startnumberSets the event start time (e.g. `14` = 2pm)