GitHub

Event Card

Block
Card for displaying event information

Basic Usage

Loading...

Installation

pnpm add @corew500/ui

Usage

import { EventCard } from "@corew500/ui/blocks/event-card"

<EventCard>Content</EventCard>

API Reference

Props

PropTypeDefaultDescription
title*string—Event title
descriptionstring—Event description
statusenum—Event status
image{ src: string; alt: string; }—Optional hero image (simple img tag)
imageSlotenum—Custom image slot for framework-specific images (e.g., Next.js Image) Takes precedence over `image` prop when provided
fallbackIconenum—Fallback icon component to show when no image is provided
metadataEventMetadata—Event metadata (date, time, location)
formatEventFormat—Event format/type (e.g., "Webinar", "In-Person")
speakersEventSpeaker[]—List of speakers
actionEventAction—Primary action button
secondaryActionEventAction—Secondary action button
customBadgeenum—Custom badge content (ReactNode or object with animated option)
translationsEventCardTranslations—i18n translations object
statusLabelsPartial<Record<EventStatus, string>>—@deprecated Use translations.status instead i18n labels for status badges
variantenumdefault—
orientationenumvertical—
layoutenumstack—

Accessibility

Screen Readers

  • - Metadata icons use aria-hidden="true" as they are decorative
  • Format icon uses aria-hidden="true" when present

Additional

  • Action buttons render as proper anchor elements when href provided
  • Card structure uses semantic heading for title
  • Status badges convey meaning through text, not just color

Localization

Translatable Content

  • - Component accepts pre-resolved translated strings
  • All user-facing text is customizable via props:
  • `title`, `description` - Event header text
  • `action.label`, `secondaryAction.label` - Button text
  • `translations.status` - Status badge labels
  • `translations.metadata` - Metadata field labels
  • `translations.speakers` - Speaker section labels and conjunctions
  • Deprecated `statusLabels` prop maintained for backward compatibility

Locale-Specific Formatting

  • `metadata` - Date/time/location values
  • `speakers[].name`, `speakers[].title` - Speaker information
  • `format.label` - Event format label