Styling the Embedded Events Widget
Part Theming
Specific parts of the Events Widget can have their default styles overridden through the ::part pseudo-element.
There are four main styling blocks:
- The widget's month and date selectors, these are the parts you can access:
date__month
: the text for the month/year OR the selected date rangedate__btn-year
: the year selector button (desktop only)date__btn-month
: the month selector button (desktop only)date__btn-month-mobile
: the month selector button (mobile only)date__txt-month-mobile-month
: the text for the month (mobile only)date__txt-month-mobile-count
: the text for the event count (mobile only)date__container-month-year-mobile
: the container for the month and year selector (mobile only)date__btn-select-dates
: the select dates / clear dates buttoncalendar__container
: the container for the calendar pop-upcalendar__btn-clear-dates
: the clear dates link buttoncalendar__btn-today
: the jump to today buttoncalendar__btn-month-year-selector
: the button to select months / yearscalendar__range-text
: the text inside calendar__btn-month-year-selectorcalendar__btn-prev
: the previous month/year buttoncalendar__btn-next
: the next month/year buttoncalendar__table-header-weekday-item
: the header cell for the weekday namecalendar__btn-month
: the button to select a month (when in month view)calendar__btn-year
: the button to select a year (when in year view)calendar__btn-day
: the button for a given daycalendar__hint
: if the day has a hint, this is the tag box that appearscalendar__hint__tag-text
: the text that displays in the above hintcalendar__legend-box
: if a legend is displayed, this is the colored box for one of the itemscalendar__legend-text
: the text that displays beside the legend boxcalendar__btn-save
: the button to save the dates
- The widget's tag filtering carousel, these are the parts you can access:
filter__btn-tag
: the selectable filter buttons in the filter carouselfilter__btn-tag-selected
: the selectable filter buttons in the filter carousel when selectedfilter__btn-tag__tag-text
: the text inside the filter buttonsfilter__btn-tag-selected__tag-text
: the text inside the filter buttons when selectedfilter__btn-prev
: the left arrow button to scroll left through the filter carouselfilter__btn-next
: the right arrow button to scroll right through the carouselfilter__gradient-left
: the gradient beside the left arrowfilter__gradient-right
: the gradient beside the right arrow
- The widget's events (featured and recurring), these are the selectable parts:
events__container
: container for the featured and recurring events sectionsevents__container-featured
: container for the featured eventsevents__container-recurring
: container for the recurring eventsevents__heading
: the heading (Featured events / Recurring events)events__txt-page-of-pages
: the "# of #" text beside the Featured events titleevents__btn-prev
: the left arrow button for the previous featured events pageevents__btn-next
: the right arrow button for the previous featured events pageevents__featured-error
: the error containerevents__featured-no-data
: the no data container for featured eventsevents__recurring-no-data
: the no data container for recurring eventscard__skeleton
: the placeholder skeleton cardcard__surface
: container which holds the Card's contentscard__body
: container for the card bodycard___tag_and_title
: container for the card tag (date) and titlecard__tag
: the event date tag (also used as the recurring events date tag)card__tag__tag-text
: the text inside the card tagcard__title
: text for the event titlecard__venue
: text for the event venuecard__hero
: container which holds the hero imagefeatured__fader-left
: the featured events left fader (visible on small screens only)featured__fader-right
: the featured events right fader (visible on small screens only)recurring__container-scroller
: the recurring events scroll containerrecurring__container-date-group
: the recurring events date group containerrecurring__container-event
: the recurring event containerrecurring__title
: text for the event titlerecurring__venue
: text for the event venuerecurring__pattern
: text for the event recurrence patternrecurring__btn-details
: the right arrow to open the event detailsrecurring__container-scroll-for-more
: the scroll for more container
- Settings specific to carousel mode
carousel__container
: container for swipercarousel__container-no-events
: skeleton container when there are no eventscarousel__gradient
: the faded gradient at the right of the carousel (visible until you reach the end)widget__controls
: the container for the prev/next and more events buttonswidget__btn-prev
: the previous button (left arrow)widget__btn-next
: the next button (right arrow)widget__btn-more-events
: the more events button (applies only when a more events link is provided)carousel__no-events-text
: the text container when there are no events
- The widget's details side pane, which has two selectable parts:
details__main
: container which holds all Operator information, underneath the image carouseldetails__info-container
: container for the top info (event name, organizer, buttons, and description)details__info-event-name-container
: container for the event name and the details button (if enabled)details__title
: text for the event titledetails__btn-see-more
: the button for the see more button (if linking to a separate page with details)details__info-organizer-container
: the container for the event oraniserdetails__organizer-title
: The event organizer titledetails__organizer-name
: The event organizer namedetails__info-contact-info-container
: the container for the event organizer buttons (website/phone/email)details__btn-contact
: the three contact buttons for the event organizer – website, phone and emaildetails__description
: text for the event descriptiondetails__map-container
: the container for the map title and map imagedetails__map-title
: the title above the map (the word Locations)details__locations-container
: the container for all of the event locationsdetails__location-container
: the container for an individual event locationdetails__location-container-left
: the left side of an event locationdetails__location-container-left-number
: the number that shows up in the left side of the containerdetails__location-container-right
: the right side of an event locationdetails__location-container-right-content
: the container for the event name and addressdetails__location-name
: the location namedetails__location-address-link
: the location address <a> tagdetails__location-address-text
: the location address textdetails__location-container-right-icons
: the container for the iconsdetails__icon-location-contact
: the location contact icons (website/phone/email)details__price-container
: the container for the price infodetails__price-title
: text for the price titledetails__price
: text for the event pricedetails__schedule-title
: text for the event schedule titledetails__schedule-subtitle
: text for the event schedule subtitledetails__schedule-pattern-summary
: container for the event repeat pattern summarydetails__schedule-date
: text for the event schedule datedetails__schedule-time
: text for the event schedule timedetails__schedule-pattern
: text for the event repeat patterndetails__schedule-note
: text for the event schedule notedetails__contact-info-container
: container for the contact info at the bottomdetails__contact-info-title
: text for the contact titledetails__contact-info-link
: link for the contact info
You may define your styles containing these overrides in any manner, but ensure they are present on your embedding website.
Our embedding widget is called the whereabouts-events-widget
, so the CSS syntax will be as follows:
<code class="language-css">whereabouts-events-widget::part(-part-name-here-) { background-color: red; ... }
Global Theming
You may override the default fonts in the widget, by passing in a font-family-override
prop to the Operators widget. If you are using an external font, ensure that it is properly loaded on your embedding website.
<code class="language-html"><whereabouts-events-widget ... font-family-override="Comic Sans MS" ... ></whereabouts-events-widget>
NOTE: If you're using the carousel mode, you can also customize the carousel scrollbar by using the following CSS variables:
<code class="language-css">whereabouts-events-widget { --swiper-scrollbar-display: none; --swiper-scrollbar-border-radius: 0px; --swiper-scrollbar-bg-color: blue; --swiper-scrollbar-drag-bg-color: red; --swiper-scrollbar-width: 100%; --swiper-scrollbar-max-width: none; --swiper-scrollbar-right-position: unset; --swiper-scrollbar-left-position: 0; --swiper-scrollbar-height: 12px; --swiper-scrollbar-drag-height: 6px; --swiper-scrollbar-padding: 3px; --swiper-scrollbar-bottom-position: 12px; }