Basic Listing Teaser
The Listing Teaser component can be used to display specific information of a particular listing, article, or thread. It is commonly used on listing pages.
Important Notes:
The whole listing UI is clickable. The headline of the listing is a link element that is expanding its click target.
Demo
This is the description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.
Warning! This is a warning message.
Solved
Locked
33 Replies
6k Views
Twig
// Set a signifier variable
{% set demo_icon %}
{% include '@bolt-components-icon/icon.twig' with {
name: 'questions',
size: 'large',
color: 'teal',
} only %}
{% endset %}
// Use the variable in the signifier prop
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
signifier: demo_icon,
headline: {
text: 'This is a listing',
tag: 'h3',
size: 'large',
link_attributes: {
href: 'https://pega.com'
},
},
meta_items: [
'Posted 8 hours 15 minutes ago',
'Last activity: 2 minutes ago',
],
status: {
solved: true,
locked: true,
replies: '33',
views: '6k',
},
description: 'This is the description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.',
warning: 'Warning! This is a warning message.',
} only %}
Listing Teaser Signifier
The signifier is a decorative element that visually represents the content nature of a listing.
Important Notes:This is a purely decorative element and is hidden from screen readers.When using an icon as the signifier, a size must be defined. It is recommended to match the size of the headline.When using an image as the signifier, a width must be defined. It is recommended to use 32px in tandem with large headline, and 38px in tandem with xlarge headline.
Demo
Listing Teaser Headline
The headline’s size, HTML tag, and link attributes can be customized via props.
Important Notes:While any size can be used, large and xlarge are recommended.Based on the structure of a particular page, the proper HTML tag should be defined via the tag prop.When using the link_attributes prop, an <a> element is wrapped around the headline text. The prop allows you to pass common link attributes such as href and target.
Demo
Listing Status, Action Menu, and Share Menu
A listing can have various statuses, use the proper prop to mark the relevant status. A popover action menu can be added by using the action_menu prop.
Important Notes:The solved status label can be customized.The locked status label can be customized.It is recommended to pass the Menu component in the action_menu prop. Additionally use the Menu component’s title prop to create a label for the action menu.
It is mandatory to pass the Share component with menu display in the share_menu prop.
Demo
Listing Meta Data and More
A listing can have meta data, a short description, and a warning.
Important Notes:Meta data can be passed via the meta_items prop, each item is visually separated by a pipe.Extra content can be passed to the description prop. It will appear below the meta data. Truncating with an ellipsis and a read more button is optional.Warning content can be passed to the warning prop. It will appear below the description. A warning icon is appended at the start.Meta data, description, and warning may contain links, use the link element to render a link. This will generate a link that is not blocked by the headline link.
Demo
This is the description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus…
Read more
Warning! This is a warning message.
Twig
// Render description and warning
{% set description %}
{% set more_link %}
{% set icon_chevron_right %}
{% include '@bolt-components-icon/icon.twig' with {
name: 'chevron-right',
} only %}
{% endset %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Read more',
icon_after: icon_chevron_right,
attributes: {
href: 'https://pega.com',
}
} only %}
{% endset %}
<p>This is the description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus…{{ more_link }}</p>
{% endset %}
{% set warning %}
<p>Warning! This is a warning message.</p>
{% endset %}
// Pass meta data, warning, and description to the component
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
headline: {
text: 'This listing has meta data and more info',
tag: 'h3',
size: 'large',
link_attributes: {
href: 'https://pega.com'
},
},
meta_items: [
'Posted by <a href="https://collaborate.pega.com" class="e-bolt-text-link e-bolt-text-link--reversed-underline">username</a> on May 21, 2020',
'Last activity: 2 minutes ago',
],
description: description,
warning: warning,
} only %}
This is a reply. Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aut, repellat natus! Nemo, fugiat. Unde deserunt soluta assumenda magnam sit excepturi voluptates repudiandae iure tempore omnis? Dolorem impedit quo iusto sapiente.
Some more text. Excepturi deleniti possimus sed corrupti illo doloribus, nam nemo hic, saepe quam repellendus officiis quaerat pariatur aliquid molestiae illum natus dolore aliquam?
// Set up the reply content
{% set reply %}
<p><strong>Replied on Aug 21, 2021</strong></p>
<p>This is a reply. Lorem ipsum dolor sit amet consectetur, adipisicing elit. Aut, repellat natus! Nemo, fugiat. Unde deserunt soluta assumenda magnam sit excepturi voluptates repudiandae iure tempore omnis? Dolorem impedit quo iusto sapiente.</p>
<p>Some more text. Excepturi deleniti possimus sed corrupti illo doloribus, nam nemo hic, saepe quam repellendus officiis quaerat pariatur aliquid molestiae illum natus dolore aliquam?</p>
{% set reply_link %}
{% set icon_chevron_right %}
{% include '@bolt-components-icon/icon.twig' with {
name: 'chevron-right',
} only %}
{% endset %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Go to reply',
icon_after: icon_chevron_right,
attributes: {
href: '/reply-123',
}
} only %}
{% endset %}
{% include '@bolt-components-headline/text.twig' with {
text: reply_link,
tag: 'p',
size: 'small',
} only %}
{% endset %}
// Pass the content to the reply prop
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
headline: {
text: 'RE: This is a post showing one of the replies',
tag: 'h3',
size: 'large',
link_attributes: {
href: 'https://pega.com'
},
},
meta_items: [
'Posted 8 hours 15 minutes ago',
'Last activity: 2 minutes ago',
],
reply: reply,
} only %}
Listing Teaser Card Variant and Spacing
By default, a listing teaser is transparent, but the card variant can activate card styles. Additionally, inset spacing can be adjusted for the card variant.
Demo
Listing Teaser Layout and Gutter
By default, a listing teaser has a horizontal layout, but it can be changed to vertical or responsive (content will wrap under the signifier at the small breakpoint).
Demo
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestias libero repellendus, dolorum vitae iste iure quas tempora! Distinctio hic ducimus excepturi adipisci est libero quia! Explicabo mollitia ad voluptatum impedit!
Twig
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
signifier: signifier,
headline: {
text: 'This listing has a responsive layout',
tag: 'h3',
size: 'large',
link_attributes: {
href: 'https://pega.com'
},
},
layout: 'responsive',
gutter: 'medium',
} only %}
Use Case: Academy Training List
Training List is a way to display the progression a particular course.
Important Notes:A training list is composed of the Listing Teaser component and the List component with solid separators.solved_label is used for customizing the solved status label text.locked_label is used for customizing the locked status label text.
Demo
// Set up a particular training
{% set demo_icon %}
{% include '@bolt-components-icon/icon.twig' with {
name: 'brand-orbit',
size: 'large',
color: 'teal',
} only %}
{% endset %}
{% set demo_training %}
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
signifier: demo_icon,
headline: {
text: 'This training is both completed and archived',
tag: 'h3',
size: 'large',
link_attributes: {
href: 'https://pega.com'
},
},
meta_items: [
'Module',
'Completed August 18, 2019',
'Last updated August 11, 2019',
],
status: {
solved: true,
solved_label: 'Completed',
locked: true,
locked_label: 'Archived',
},
warning: 'This training has a warning.'
} only %}
{% endset %}
// Render a list to display trainings
{% include '@bolt-components-list/list.twig' with {
spacing: 'small',
inset: true,
separator: 'solid',
items: [
demo_training,
]
} only %}
Use Case: Collaboration Center Post List
Post List is a way to display activities in Pega’s Collaboration Center.
Important Notes:
A post list is composed of the Listing Teaser component and the List component with solid separators.
Demo
This is the description. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus…
Read more
Use Case: Article List
Article List is a way to display teasers for a list of articles.
Important Notes:An article list is composed of the Listing Teaser component and the List component with solid separators.Keep in mind the signifier and headline vertically center align with each other. When using image as the signifier, it is recommended to use 32px in tandem with large headline, and 38px in tandem with xlarge headline.
Demo
{% include '@bolt-components-listing-teaser/listing-teaser.twig' with {
signifier: signifier,
layout: 'responsive', // Allow the content to wrap under the signifier when it runs out of space.
eyebrow_items: [
eyebrow_1,
eyebrow_2,
],
headline: {
text: 'This is a listing',
tag: 'h3',
size: 'xlarge',
link_attributes: {
href: 'https://pega.com', // Or set type: 'button' for video modals
},
},
meta_items: [
meta_item_1,
meta_item_2,
meta_item_3,
],
description: description,
chip_list: chip_list,
} only %}