Jump to main content

Work in progress

Vanilla's patterns are newly released and still evolving as we receive feedback.

Please use this pattern if you would like to use a designated logo section with an accompanying heading and optional description. If you would instead like to simply display logos within another section, please use the Logo block component, which should be treated as a building block that can be inserted into other patterns without needing to include a title.

The logo section is a pattern where the logo block serves as the main content, combined with a muted heading, optional description, and a CTA block.

It is composed of the following elements:

Element Description
Title (required) Main heading text (h2)
Description Description text (one or more paragraphs)
Blocks Array of blocks (either cta-block or logo-block)

Layout Options

Linked Title

The title can be made clickable by providing link attributes.

Padding Variants

Logo section supports customizable padding options at the pattern level, using the section pattern. The Jinja macro for the pattern applies the section padding automatically.

By default, the pattern is wrapped in a regular section. You can also use a deep section by changing the padding parameter.

Blocks

Blocks in logo section use a flexible model where you can pass an array of blocks representing different types. These can either be CTA Block or Logo Block.

CTA Block

The CTA block allows you to include call-to-action elements within the section.

It supports three types of CTA items:

  • Primary: 1 main call-to-action button
  • Secondary: Supporting action buttons
  • Link: Text link
{
  "type": "cta-block",
  "item": {
    "primary": {
      "content_html": "Primary button text",
      "attrs": {
        "href": "link-url",
        "class": "optional-css-class"
      }
    },
    "secondaries": [
      {
        "content_html": "Secondary button text",
        "attrs": {
          "href": "link-url"
        }
      }
    ],
    "link": {
      "content_html": "Link text",
      "attrs": {
        "href": "link-url"
      }
    }
  }
}
  • primary: Optional primary button configuration.
  • secondaries: Optional array of secondary button configurations.
  • link: Optional text link configuration.

Each of the CTA configurations accepts the following properties:

  • content_html: The inner HTML of the CTA item.
  • attrs: Dictionary of button/link attributes. These are applied to the CTA element. If href is present, the CTA item will be an <a>, otherwise it will be a <button>. See attribute forwarding docs for more info.

Note: The cta-block utilizes CTA block from Basic section pattern

Logo Block

The logo block is a list of logos, within a fixed width container. The logos are automatically wrapped.

{
  "type": "logo-block",
  "item": {
    "logos": [
      {
        "attrs": {
          "src": "image-url",
          "alt": "alt-text"
        }
      }
    ]
  }
}

Logo section without description

Logo section without CTA block

Logo section without description and CTA block

Jinja Macro

The vf_logo_section Jinja macro can be used to generate a logo section pattern. The API for the macro is shown below.

Parameters

Name Required? Type Default Description
title Yes Object N/A Title configuration object with text and optional link_attrs
title.text Yes string N/A The main title text (rendered as h2)
title.link_attrs No Object N/A Attributes of an anchor element, as a dictionary. See attribute forwarding docs for more info.
blocks Yes Array<Object> [] Array of blocks to display in the section. See Blocks for configuration details.
padding No One of:
'deep',
'default'
'default' Padding variant for the entire section

Slots

Name Required? Description
description No Descriptive content for the section.
One or more paragraphs

Import

Jinja Macro

To import the Logo Section Jinja macro, copy the following import statement into your Jinja template.

{% from "_macros/vf_logo-section.jinja" import vf_logo_section %}

View the building with Jinja macros guide for macro installation instructions.

SCSS

Since Patterns leverage many other parts of Vanilla in their composition and content, we recommend importing the entirety of Vanilla for full support.