Skip to main content

Featured Card

With high visual emphasis, a Featured Card displays content and an action about a single subject.

A Featured Card is often used on a Landing page layout, such as a homepage, campaign page or section index page, but can be used simply to break up the monotony of long-form content.

An event variant of a Featured Card is often used for a single event that is of high-priority, high-impact, popular, or time-sensitive.

Examples

Right Image

Left Image

Event

Event with Date Range

Implementation Notes

Event Variant

When using the event modifier, the component requires the following additional Twig variables:

  • event (object): Contains date information for the event
    • event.date.month (string): Abbreviated month (e.g., "Sept.")
    • event.date.day (string): Day of the month (e.g., "23")
    • event.date_end (object, optional): End date for multi-day events
      • event.date_end.month (string): Abbreviated month
      • event.date_end.day (string): Day of the month
  • list_items (array, required): Event details displayed below the heading. Each item contains:
    • item.icon (string): Name of the BUX icon (e.g., clock, location-pin)
    • item.term (string): Label for the detail (e.g., "Time", "Location")
    • item.desc (string): Value for the detail (e.g., "1:30 p.m. - 3:30 p.m.")

list_items is required for all event card types. Omitting it will cause a template error because the event variant unconditionally renders the icon description list.

{% include '@featured-card' with {
modifier: 'event',
card_heading: 'Event Title',
card_name: 'Featured Event Card',
card_url: '#',
image_position: 'left',
image_url: 'https://example.com/image.jpg',
image_alt_text: 'Description of image',
taxonomy: 'Optional topic',
event: {
date: { month: 'Sept.', day: '23' }
},
list_items: [
{ term: 'Time', desc: '1:30 p.m. - 3:30 p.m.', icon: 'clock' },
{ term: 'Location', desc: 'BLIC / Library', icon: 'location-pin' }
]
} %}

Default Variant

The default (non-event) variant uses the featured modifier and accepts the standard card variables:

  • modifier: Set to featured
  • card_heading (string): Heading text
  • card_body (string, optional): Body content
  • card_url (string): Link URL
  • card_cta (string): Call-to-action button text
  • image_position (string): left or right
  • image_url (string): Image source URL
  • image_alt_text (string): Image alt text

Usage

Dos

  • Use to call attention to most important features among all content
  • Limit to one per page; use occasionally on pages without sidebars
  • Include a high-quality image
  • Strongly consider using the included Button as a call-to-action
  • Use the “right image” variant if the subject of the image faces left
  • Use the “left image” variant if the subject of the image faces right

Don’ts

  • Don’t write multiple paragraphs into the body
  • Don't use if a high-visual emphasis is needed on a homepage; consider a Hero instead
  • Don’t use images that contain text
  • Don't use images that are low resolution or low quality

Accessibility

  • Make sure to write appropriate alternative text if including an image in your card
  • See the WebAIM website for more information on writing alternative text for images
Back to top