← Back to docs

Widget customization

Use CSS custom properties to match the widget to your site's design system.

CSS custom properties

The widget uses Shadow DOM, but exposes --embedacal-* CSS custom properties that cascade into the shadow root:

CSS
embedacal-widget {
  /* Colors */
  --embedacal-bg: #ffffff;
  --embedacal-text: #1a1a1a;
  --embedacal-text-secondary: #6b7280;
  --embedacal-text-muted: #9ca3af;
  --embedacal-border: #e5e7eb;
  --embedacal-accent: #f43f5e;
  --embedacal-accent-text: #ffffff;

  /* Layout */
  --embedacal-radius: 12px;
  --embedacal-font-family: system-ui, -apple-system, sans-serif;
  --embedacal-font-size: 14px;
  --embedacal-max-height: 600px;
}

Themes

Set the theme attribute to light or dark for built-in presets:

HTML
<!-- Light theme (default) -->
<embedacal-widget feed="my-feed" theme="light"></embedacal-widget>

<!-- Dark theme -->
<embedacal-widget feed="my-feed" theme="dark"></embedacal-widget>

Brand colors

Override the accent color to match your brand:

CSS
/* Purple brand example */
embedacal-widget {
  --embedacal-accent: #7c3aed;
  --embedacal-accent-text: #ffffff;
}

/* Green brand with rounded corners */
embedacal-widget {
  --embedacal-accent: #059669;
  --embedacal-radius: 16px;
}

Full custom styling

Add the disable-styles attribute to strip all default CSS. Then target the widget's internal elements via ::part() selectors:

HTML
<embedacal-widget feed="my-feed" disable-styles></embedacal-widget>
CSS
embedacal-widget::part(event-card) {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

embedacal-widget::part(event-title) {
  font-weight: 600;
  font-size: 1rem;
}

embedacal-widget::part(event-date) {
  color: #6b7280;
  font-size: 0.875rem;
}

embedacal-widget::part(event-location) {
  color: #9ca3af;
  font-size: 0.75rem;
}

Available CSS parts

Part nameDescription
containerOutermost wrapper
headerView tabs and search bar area
event-listScrollable event list container
event-cardIndividual event card
event-titleEvent title text
event-dateEvent date/time text
event-locationEvent location text
calendar-gridMonthly calendar grid
map-containerGoogle Maps embed container

Responsive sizing

The widget automatically adjusts to its container's width. You can constrain it:

CSS
embedacal-widget {
  max-width: 480px;
  width: 100%;
  --embedacal-max-height: 500px;
}