PhiaUi.Components.ScheduleEventCard (phia_ui v0.1.17)

Copy Markdown View Source

ScheduleEventCard component — an event card with a colored left border, title, date/time range, optional avatar group, and a category badge.

Designed for scheduling/calendar sidebar lists.

Categories

CategoryBorder colourBadge colours
:meetingblue-500bg-blue-100 / text-blue-700
:eventteal-500bg-teal-100 / text-teal-700
:leavered-400bg-red-100 / text-red-600
:defaultprimarybg-primary/10 / text-primary

Examples

<.schedule_event_card
  title="Team Standup"
  category={:meeting}
  date="2026 / JAN / 15"
  time_range="09:00 AM - 10:00 AM"
  avatars={[%{src: "/avatars/alice.png", name: "Alice"}, "Bob"]}
  max_avatars={3}
/>

<.schedule_event_card title="Annual Leave" category={:leave} />

Summary

Functions

Renders a schedule event card with a coloured left border, title, optional date/time rows, stacked avatars and a category badge.

Functions

schedule_event_card(assigns)

Renders a schedule event card with a coloured left border, title, optional date/time rows, stacked avatars and a category badge.

Attributes

  • title (:string) (required) - Event title displayed in bold.
  • date (:string) - Date string, e.g. "2022 / JUL / 30". Omit to hide the date row. Defaults to nil.
  • time_range (:string) - Time range string, e.g. "09:00 AM - 11:00 AM". Omit to hide the time row. Defaults to nil.
  • category (:atom) - Category determines the left-border and badge colour. Defaults to :default. Must be one of :meeting, :event, :leave, or :default.
  • category_label (:string) - Override the badge text. Falls back to the category name. Defaults to nil.
  • avatars (:list) - List of avatar descriptors — strings or %{src: url, name: name} maps. Defaults to [].
  • max_avatars (:integer) - Maximum number of avatar circles to display before showing an overflow count. Defaults to 3.
  • class (:string) - Additional CSS classes merged via cn/1. Defaults to nil.
  • Global attributes are accepted. HTML attributes forwarded to the root element.