Renders a single event within a calendar cell or time grid.
Supports status-based styling (confirmed, tentative, cancelled, pending approval), urgency indicators (attention, warning, critical with animated borders), priority visual weight, and custom rendering via slots.
Summary
Functions
Renders an event element with status-aware styling.
Functions
Renders an event element with status-aware styling.
Attributes
event— APhoenixLiveCalendar.Eventstructon_click— Event handler when the event is clickedcompact— Render in compact mode (title only, no time)class— Additional CSS classestime_format—:h24or:h12(default::h24)
Status styling
:confirmed— solid background (default):tentative— dashed border, reduced opacity:cancelled— strikethrough text, ghost styling:pending_approval— pulsing border animation:no_show— red-tinted, strikethrough
Urgency indicators
:none— no special indicator (default):attention— subtle pulsing border:warning— yellow/amber animated border:critical— red animated border, more prominent
Slots
inner_block— Custom event rendering. Receives the event as a slot argument.
Attributes
event(PhoenixLiveCalendar.Event) (required)on_click(:any) - Defaults tonil.compact(:boolean) - Defaults tofalse.class(:string) - Defaults to"".time_format(:atom) - Defaults to:h24.default_color(:string) - Background applied when the event has nocolorof its own, so a color-less event is always legible (previously it rendered with NO background whileinfer_text_color(nil)assumed a primary one — white text on the naked cell). The event's owncoloralways wins.Defaults to
"bg-primary".id_suffix(:any) - Disambiguates the DOM id when the SAME event renders more than once in one view — a midnight-crossing timed event occupies two month/week day cells, and a multi-resource event renders once per resource column. Callers rendering events inside a per-date/per-resource loop pass the loop key here; without it LiveView reports duplicate DOM ids and morphdom patching misbehaves.Defaults to
nil.
Slots
inner_block