Census Carousel

The Census Carousel Component allows the content author to present content in a navigable carousel. It allows you to a display a selection of rotating images with a title, brief description and link to an associated story, event, program, or page elsewhere in the site. Component has a minimum of 3 items and a maximum of 5 items.

On This Page:

Example

View on public site:

Examples by Template

Census 3 Column
  • Census 3 Column
  • Census 2 Column Left
  • Census 2 Column Right
Census 3 Column

When to Use

Use a Census Carousel component when you have a set of featured content (pages with images or videos) that you want to display. The Carousel component can be placed on any page in the site.

Usage

The Carousel Component presents content in a navigable carousel, with a minimum of 3 items and a maximum of 5 items.

The component displays a series of sliding images, one at a time, in an order the author specifies. Selectable controls also let visitors cycle through the displayed pages on demand.

Note:

The slide controls are not enabled when in Edit mode. Use Preview mode or the View as Published option to interact with the carousel as a reader of the published content would.

Configure Dialog

The configure dialog allows the content author to add and rearrange slides. Expand the sections below to learn more about the Carousel's dialog box.

Tab: General

The General tab provides the option to customize the following fields of the Carousel component:

  • Title – If you'd like to add a Section Title, insert it here.
  • Title Size – Size of the title text. (H2 default)
  • Title Alignment – Overrides the default alignment of the title text.
  • Description – If you'd like to add a description, insert it here.
  • Description Alignment – Overrides the default alignment of the description text.
  • View All Page to Link to – Path to AEM page to link to.
  • View All Text – View All text (optional, defaults to 'View All')

Tab: Carousel Items

Use the Add button to choose a page to add as a tab in the Carousel. 

Once added, an entry is added to the list, which contains the following fields:

  • Add – Click 'Add field' to add a new carousel item.
  • Page – Insert the URL to the AEM page the component will link to.
  • Title – The title to show. Will override AEM Page if selected.
  • Teaser – The description or teaser text for this particular carousel item. Will override AEM Page if selected.
  • Label – The banner label to show (1-Item Carousel only, will not show if video is added).
  • Manual Tag – The banner tag to show (1-Item Carousel only).
  • Call-to-Action Text – The call-to-action text to display. Defaults to "View More" is not authored. (Not Applicable to 1-Feature View)
  • Image – The image to associate with this item. Will display in the background of the Carousel Item and override video and AEM page image.
  • Alt Text – The alternative text to use for the image.
  • Image is decorative – If decorative is checked the resource/image will not be printed or screenreader will bypass the reading.
  • Enter YouTube ID – The YouTube ID is the collection of letters and numbers that appears in the url after watch?v= when viewing a YouTube video. Will override manual image and AEM page image.

Developer Resources

Expand the sections below to see the Census Carousel Component's HTML and JS output.

<div class="cmp-carousel">

 

 


<div class="uscb-color-primary uscb-layout-row uscb-layout-align-flex-start uscb-text-align-left uscb-margin-TB-20">


<h3 style="color: #131313;" class="uscb-h3 ">Example</h3>

 

</div>
<p style="color: #131313;" class="uscb-layout-row uscb-layout-align-flex-start uscb-text-align-left uscb-sub-heading-1 uscb-line-height-20-18 uscb-margin-TB-20">
Note: Images MUST be 16:9 and no larger than 2mb. Limit frames to 5 images. (1440px x 1035px)
</p>

 

 


<div class="uscb-carousel" id="S6L34RGA4E3JA9EDRL">
<!-- Desktop -->
<div class="uscb-slideshow-container uscb-layout-row uscb-layout-align-space-between uscb-layout-align-center-center uscb-hide-md">
<!-- Previous -->
<a role="button" tabindex="0" aria-label="Previous Slide" class="uscb-prev-spec uscb-prev-arrow uscb-layout-row uscb-layout-align-center-center uscb-print-hide uscb-hide-md">
<span class="uscb-carousel-transition-icon o-angle-left-1 uscb-font-3x uscb-icon-button"></span>
</a>

<!-- Current -->
<div role="tabpanel" class="uscb-slide uscb-fade uscb-layout-row uscb-width-100">
<div class="data-uscb-carousel-media-container uscb-layout-col uscb-flex-row-gt-md-50 uscb-padding-0 uscb-carousel-spec-img"><a href="/academy" class="data-uscb-carousel-cta-link uscb-text-decoration-none"><div class="uscb-carousel-spec-img uscb-16-9-container"><img src="/content/dam/Census/UAT/aem-user-guide/dialog-box-screenshots/carouselimage.PNG" class="uscb-16-9-content " id="uscb-carousel-img-spec" alt=""></div></a></div>
<div class="uscb-layout-col uscb-flex-row-gtm-sm-50 uscb-slide-desc uscb-padding-LR-gt-md-20" aria-live="polite">
<h2 class="uscb-heading-2 uscb-bold uscb-spec-header uscb-margin-T-0">Carousel Item 1</h2>
<p class="uscb-body-large-02 uscb-spec-desc uscb-margin-TB-20">Quid ex ea quid percipit aut ad naturam aut fugit.</p>

<div class="uscb-layout-row uscb-layout-align-flex-start uscb-layout-align-vert-center">
<a href="/academy" onclick="linkClick(this, 'Census Carousel Component');" class="uscb-text-decoration-none uscb-transparent-button data-uscb-carousel-cta-link uscb-layout-align-center-center">
<span class="data-uscb-carousel-cta-link-text">Go To Carousel Item 1</span>
<div class="uscb-icon-button uscb-margin-L-5">
<span class=""></span>
<svg class="ovaltealcircle" viewBox="0 0 64 64">
<circle cx="32" cy="32" r="30" fill="#076C79" stroke="#076C79" stroke-miterlimit="10" stroke-width="3" stroke-linejoin="miter" stroke-linecap="butt"></circle>
<path fill="none" stroke="#ffffff" stroke-miterlimit="10" stroke-width="3" d="M28 21.002L41 32 28 43.002" stroke-linejoin="miter" stroke-linecap="butt"></path>
</svg>
</div>
</a>
</div>

</div>
</div>

<!-- Next -->
<a role="button" tabindex="0" aria-label="Next Slide" class="uscb-next-spec uscb-next-arrow uscb-layout-row uscb-layout-align-center-center uscb-print-hide uscb-hide-md">
<span class="uscb-carousel-transition-icon o-angle-right-1 uscb-font-3x uscb-icon-button"></span>
</a>
</div>
<div aria-label="Choose slide to display" role="tablist" class="uscb-dot-container uscb-hide-md uscb-text-align-center uscb-layout-row uscb-layout-align-space-between uscb-overflow-hidden uscb-padding-TB-20">
<div role="tab" tabindex="0" aria-label="Slide 1" class="data-uscb-carousel-mini uscb-carousel-spec-mini uscb-width-20 uscb-active-carousel-special" id="data-uscb-mini-S6L34RGA4E3JA9EDRL-0">
<div class="uscb-16-9-container">
<img src="/content/dam/Census/UAT/aem-user-guide/dialog-box-screenshots/carouselimage.PNG" alt="" class="uscb-16-9-content ">

</div>
<div class="uscb-layout-row">
<p class="uscb-margin-R-10 uscb-padding-T-20 uscb-text-align-left uscb-body-small-02">
Carousel Item 1
</p>
</div>
</div>
<div role="tab" tabindex="0" aria-label="Slide 2" class="data-uscb-carousel-mini uscb-carousel-spec-mini uscb-width-20 uscb-margin-L-10" id="data-uscb-mini-S6L34RGA4E3JA9EDRL-1">
<div class="uscb-16-9-container">
<img src="/content/dam/Census/UAT/aem-user-guide/dialog-box-screenshots/carouselimage.PNG" alt="" class="uscb-16-9-content ">

</div>
<div class="uscb-layout-row">
<p class="uscb-margin-R-10 uscb-padding-T-20 uscb-text-align-left uscb-body-small-02">
Carousel Item 2
</p>
</div>
</div>
<div role="tab" tabindex="0" aria-label="Slide 3" class="data-uscb-carousel-mini uscb-carousel-spec-mini uscb-width-20 uscb-margin-L-10" id="data-uscb-mini-S6L34RGA4E3JA9EDRL-2">
<div class="uscb-16-9-container">
<img src="/content/dam/Census/UAT/aem-user-guide/dialog-box-screenshots/carouselimage.PNG" alt="" class="uscb-16-9-content ">

</div>
<div class="uscb-layout-row">
<p class="uscb-margin-R-10 uscb-padding-T-20 uscb-text-align-left uscb-body-small-02">
Carousel Item 3
</p>
</div>
</div>
<div role="tab" tabindex="0" aria-label="Slide 4" class="data-uscb-carousel-mini uscb-carousel-spec-mini uscb-width-20 uscb-margin-L-10" id="data-uscb-mini-S6L34RGA4E3JA9EDRL-3">
<div class="uscb-16-9-container">
<img src="/content/dam/Census/UAT/aem-user-guide/dialog-box-screenshots/carouselimage.PNG" alt="" class="uscb-16-9-content ">

</div>
<div class="uscb-layout-row">
<p class="uscb-margin-R-10 uscb-padding-T-20 uscb-text-align-left uscb-body-small-02">
Carousel Item 4
</p>
</div>
</div>

</div>

<!-- Mobile and Tablet -->
<div class="uscb-slideshow-container uscb-slideshow-container-tablet-mobile uscb-layout-row uscb-layout-align-center-center uscb-hide-gt-md uscb-grid-width-full">
<!-- Previous -->
<div role="button" tabindex="0" aria-label="Previous Slide" class="uscb-layout-col uscb-grid-tbl-6 uscb-grid-mbl-3 uscb-slide uscb-prev-spec uscb-slide-prev">
<div role="presentation" aria-hidden="true" class="uscb-fade uscb-layout-col">
<div class="uscb-layout-col uscb-padding-0 uscb-carousel-spec-img-prev data-uscb-carousel-media-container-prev"><a href="/academy" class="data-uscb-carousel-cta-link-prev uscb-text-decoration-none"><div class="uscb-carousel-spec-img uscb-16-9-container"><img src="/content/dam/Census/UAT/aem-user-guide/dialog-box-screenshots/carouselimage.PNG" class="uscb-16-9-content " id="uscb-carousel-img-spec-prev" alt=""></div></a></div>
<div class="uscb-layout-col uscb-slide-desc" aria-live="polite">
<h2 class="uscb-body-large-02 uscb-bold uscb-margin-T-10 uscb-carousel-slide-header uscb-spec-header-prev"></h2>
<p class="uscb-body-small-02 uscb-margin-TB-20 uscb-carousel-slide-desc uscb-spec-desc-prev"></p>

</div>
</div>
</div>

<!-- Current -->
<div role="tabpanel" class="uscb-slide uscb-fade uscb-layout-col uscb-grid-tbl-6 uscb-grid-mbl-3">
<div class="uscb-layout-col uscb-padding-0 uscb-carousel-spec-img data-uscb-carousel-media-container"><a href="/academy" class="data-uscb-carousel-cta-link uscb-text-decoration-none"><div class="uscb-carousel-spec-img uscb-16-9-container"><img src="/content/dam/Census/UAT/aem-user-guide/dialog-box-screenshots/carouselimage.PNG" class="uscb-16-9-content " id="uscb-carousel-img-spec" alt=""></div></a></div>
<div class="uscb-layout-col uscb-slide-desc" aria-live="polite">
<h2 class="uscb-body-large-02 uscb-bold uscb-margin-T-10 uscb-carousel-slide-header uscb-spec-header">Carousel Item 1</h2>
<p class="uscb-body-small-02 uscb-margin-TB-10 uscb-carousel-slide-desc uscb-spec-desc">Quid ex ea quid percipit aut ad naturam aut fugit.</p>

<div class="uscb-layout-row">
<a href="/academy" onclick="linkClick(this, 'Census Carousel Component');" class="uscb-text-decoration-none uscb-transparent-button uscb-body-small-02 uscb-layout-align-center-center data-uscb-carousel-cta-link">
<span class="data-uscb-carousel-cta-link-text">Go To Carousel Item 1</span>
<div class="uscb-icon-button uscb-margin-L-5">
<span class=""></span>
<svg class="ovaltealcircle" viewBox="0 0 64 64">
<circle cx="32" cy="32" r="30" fill="#076C79" stroke="#076C79" stroke-miterlimit="10" stroke-width="3" stroke-linejoin="miter" stroke-linecap="butt"></circle>
<path fill="none" stroke="#ffffff" stroke-miterlimit="10" stroke-width="3" d="M28 21.002L41 32 28 43.002" stroke-linejoin="miter" stroke-linecap="butt"></path>
</svg>
</div>
</a>
</div>

</div>
</div>

<!-- Next -->
<div role="button" tabindex="0" aria-label="Next Slide" class="uscb-layout-col uscb-grid-tbl-6 uscb-grid-mbl-3 uscb-slide uscb-next-spec uscb-slide-next">
<div role="presentation" aria-hidden="true" class="uscb-fade uscb-layout-col">
<div class="uscb-layout-col uscb-padding-0 uscb-carousel-spec-img-next data-uscb-carousel-media-container-next"><a href="/partners" class="data-uscb-carousel-cta-link-next uscb-text-decoration-none"><div class="uscb-carousel-spec-img uscb-16-9-container"><img src="/content/dam/Census/UAT/aem-user-guide/dialog-box-screenshots/carouselimage.PNG" class="uscb-16-9-content " id="uscb-carousel-img-spec-next" alt=""></div></a></div>
<div class="uscb-layout-col uscb-slide-desc" aria-live="polite">
<h2 class="uscb-body-large-02 uscb-bold uscb-margin-T-10 uscb-carousel-slide-header uscb-spec-header-next">Carousel Item 2</h2>
<p class="uscb-body-small-02 uscb-margin-TB-10 uscb-carousel-slide-desc uscb-spec-desc-next">Quid ex ea quid percipit aut ad naturam aut fugit.</p>

<div class="uscb-layout-row">
<a href="/partners" onclick="linkClick(this, 'Census Carousel Component');" class="uscb-text-decoration-none uscb-transparent-button uscb-body-small-02 uscb-layout-align-center-center data-uscb-carousel-cta-link-next">
<span class="data-uscb-carousel-cta-link-text-next">Go To Carousel Item 1</span>
<div class="uscb-icon-button uscb-margin-L-5">
<span class=""></span>
<svg class="ovaltealcircle" viewBox="0 0 64 64">
<circle cx="32" cy="32" r="30" fill="#076C79" stroke="#076C79" stroke-miterlimit="10" stroke-width="3" stroke-linejoin="miter" stroke-linecap="butt"></circle>
<path fill="none" stroke="#ffffff" stroke-miterlimit="10" stroke-width="3" d="M28 21.002L41 32 28 43.002" stroke-linejoin="miter" stroke-linecap="butt"></path>
</svg>
</div>
</a>
</div>

</div>
</div>
</div>
</div>
<div class="uscb-layout-row uscb-layout-align-center-center uscb-hide-gt-md uscb-margin-TB-10">
<div class="uscb-dot-container-spec uscb-text-align-center uscb-carousel-dot-cont-spec uscb-layout-row uscb-layout-align-center-center">
<span class="uscb-dot-spec uscb-margin-LR-5 uscb-active-carousel"></span>
<span class="uscb-dot-spec uscb-margin-LR-5 "></span>
<span class="uscb-dot-spec uscb-margin-LR-5 "></span>
<span class="uscb-dot-spec uscb-margin-LR-5 "></span>

</div>
</div>
</div>

</div>

Top of Section

// CAROUSEL
var photoObjectArray = [
{
image: 'https://picsum.photos/1000/200/?random',
title: 'NAICS Code Lookup',
desc: 'Look up a NAICS code by keyword or industry',
button: 'Naics Lookup'
},
{
image: 'https://picsum.photos/1100/400/?random',
title: 'Quick Facts',
desc: 'Look up a Quick facts by keyword ',
button: 'Quick Facts'
},
{
image: 'https://picsum.photos/1200/500/?random',
title: 'American Fact Finder',
desc: 'Learn About up a American Fact Finder ',
button: 'Americn FactFinder'
},
{
image: 'https://picsum.photos/100/400/?random',
title: 'Population Clock',
desc: 'The population clock of the world',
button: 'Population Clock'
},
{
image: 'https://picsum.photos/1000/700/?random',
title: 'Census Business Builder',
desc: 'Census Business Builder Page',
button: 'Business Builder'
}
];

// CAROUSEL BUTTONS
var currentObject = photoObjectArray[0];
var currentObjectIndex = 0;
$('.uscb-next-spec').click(function () {

if (currentObjectIndex === photoObjectArray.length - 1) {
currentObjectIndex = 0;
} else {
++currentObjectIndex;
}

currentObject = photoObjectArray[currentObjectIndex];
$('#uscb-carousel-img-spec').attr('src', currentObject.image);
$('#uscb-carousel-img-spec').attr('alt', currentObject.desc);
$(".uscb-spec-header").text(currentObject.title);
$('.uscb-spec-desc').text(currentObject.desc);
$('.uscb-spec-button').text(currentObject.button);
// remove active class
$('.uscb-carousel-spec-mini').each(function (index, element) {
$(element).removeClass('uscb-active-carousel-special');
})

$($(".uscb-carousel-spec-mini")[currentObjectIndex]).addClass('uscb-active-carousel-special');

// dots used on special container mobile
// remove active class
$('.uscb-dot-spec').each(function (index, element) {
$(element).removeClass('uscb-active-carousel');
})

$($(".uscb-dot-spec")[currentObjectIndex]).addClass('uscb-active-carousel');

});

$(".uscb-prev-spec").click(function () {
if (currentObjectIndex <= 0) {
currentObjectIndex = photoObjectArray.length - 1;
} else {
currentObjectIndex--;
}

currentObject = photoObjectArray[currentObjectIndex];
$('#uscb-carousel-img-spec').attr('src', currentObject.image);
$('#uscb-carousel-img-spec').attr('alt', currentObject.desc);
$(".uscb-spec-header").text(currentObject.title);
$('.uscb-spec-desc').text(currentObject.desc);
$('.uscb-spec-button').text(currentObject.button);

// remove active class
$('.uscb-carousel-spec-mini').each(function (index, element) {
$(element).removeClass('uscb-active-carousel-special');
})

$($(".uscb-carousel-spec-mini")[currentObjectIndex]).addClass('uscb-active-carousel-special');

// dots used on special container
// remove active class
$('.uscb-dot-spec').each(function (index, element) {
$(element).removeClass('uscb-active-carousel');
})

$($(".uscb-dot-spec")[currentObjectIndex]).addClass('uscb-active-carousel');
});

$(document).ready(function () {
$($(".uscb-dot-spec")[currentObjectIndex]).addClass('uscb-active-carousel');
$('#uscb-carousel-img-spec').attr('src', currentObject.image);
$('#uscb-carousel-img-spec').attr('alt', currentObject.desc);
$($(".uscb-carousel-spec-mini")[currentObjectIndex]).addClass('uscb-active-carousel-special');
})

// Create the preview below carousel
$.each(photoObjectArray, function (index, value) {
$('.uscb-dot-container-special').append('<div class="uscb-layout-column uscb-carousel-spec-mini "> <img class="uscb-flex-col-55" src="' + value.image + '" alt=""/> <div class="uscb-flex-col-45 uscb-layout-row uscb-layout-align-center-center"> <p class="uscb-title-3">' + value.title + '</p></div> </div>');
});

// Create the small dots below carousel
$.each(photoObjectArray, function (index, value) {
$('.uscb-dot-container-spec').append('<span class="uscb-dot-spec" ></span>');
});

 

Top of Section
Is this page helpful?
Thumbs Up Image Yes Thumbs Down Image No
NO THANKS
255 characters maximum 255 characters maximum reached
Thank you for your feedback.
Comments or suggestions?

Top

Back to Header