Skip to content

DOM Containers ​

Haven expects specific DOM elements on your page. You provide the containers; Haven renders content into them.

Required ​

Main app container ​

html
<div id="haven-app"></div>
PropertyValue
Default selector#haven-app
Overrideselector in .directory.init() or .calendar.init()

This is where the product/event list and detail views render.

Optional (external containers) ​

These containers live outside #haven-app. Haven renders into them when the corresponding option is configured.

html
<div id="haven-breadcrumb-directory"></div>
javascript
breadcrumb: {
  enabled: true,
  selector: '#haven-breadcrumb-directory',
}

Filter ​

html
<div id="haven-filter-directory"></div>
javascript
filter: {
  selector: '#haven-filter-directory',
  fields: { /* ... */ },
}

Ongoing events sidebar (calendar) ​

html
<div id="haven-app--ongoing">
  <h2>Ongoing Events</h2>
  <div id="haven-list--ongoing"></div>
</div>
javascript
ongoing: {
  selector: '#haven-list--ongoing',
  container: '#haven-app--ongoing',
}

Haven shows/hides container automatically based on whether ongoing events exist and the current view state.

Generated containers ​

Haven creates internal wrapper elements. You can control their IDs:

OptionDefaultDescription
options.idhaven-listID of the list wrapper inside the selector

For example, with id: 'haven-calendar', Haven generates:

html
<div id="haven-app">
  <div id="haven-calendar" class="haven__calendar">
    <ul class="haven__list">
      <!-- items -->
    </ul>
  </div>
</div>

Full directory ​

html
<div id="haven-container">
  <div id="haven-breadcrumb-directory"></div>
  <div id="haven-filter-directory"></div>
  <div id="haven-app"></div>
</div>

Calendar with ongoing sidebar ​

html
<div id="main">
  <div id="haven-app"></div>
  <div id="haven-app--ongoing">
    <h2>Ongoing Events</h2>
    <div id="haven-list--ongoing"></div>
  </div>
</div>

Minimal widget ​

html
<div id="haven-upcoming-widget">
  <h2>Upcoming Events</h2>
  <div id="haven-upcoming"></div>
</div>

Map element ​

When includeMap: true, Haven generates a map element with ID haven-map--{options.id} (e.g. haven-map--haven-list). The map is inserted according to map.mapAttachment.

The lightbox is created dynamically and appended to the document body. No container is required.

CSS classes on body ​

Haven adds view classes to <body> for styling:

ClassWhen
haven__view--directory-listDirectory list view
haven__view--calendar-dailyCalendar daily view
(others)Based on module and format

Theme CSS targets these classes for layout control.

Haven Destinations integration documentation