Drupal Blocks Reference
When working with Layout Builder in Drupal 8, there are many custom blocks available. This page has a sample of each block type, along with some helpful notes.
New custom blocks are being developed all the time. The styles on existing blocks are subject to change as theme updates are released. This page will reflect the latest changes. (You can read about the latest theme updates in WesternToday within the WebTech Monthly News.)
If you have an idea for a new type of block, don't hesitate to get in touch!
If you see a block here that you do not see available on your site, contact your site administrator or Web Tech and ask for that block type to be enabled.
Adding Classes to a Block
Many, but not all, block types have a field for adding custom classes. These classes have the effect of adding additional styling to the block type. For some blocks, this field is enabled by default. For others, you may need to contact WebTech to have the field added.
In many cases, you can also add multiple custom classes. For example, in image links, one of the variations has both smaller and simple added to the block.
This is done by typing out the first class name, adding a space and then typing out the next class name. You can try combining any variation you wish for each block type.
The following is an accordion block. Ideal for FAQs, or content that should be hidden unless a user may have a specific interest in the hidden content.
Accessibility note: the headings can be adjusted in the block, but all headings in the accordion should be at the same level for best user experience.
This is the content related to the first question.
This is the content related to the second question.
Here's content related to a third question.
This is an announcement. The icon can be changed by using the text for any Material Icon.
Basic blocks are handy when all you need to do is put in some vanilla content. There are no customization options for basic blocks.
Beyond Basics Block
Beyond basics blocks have a number of options for customizing the headings, font, and background colors. There is also a custom class field for advanced styling options.
This block has a dark blue background, a sans-serif H2 heading, and large font.
There are some spacing and alignment classes that can be added to the "Custom classes" field of a beyond basic block as well.
Margin classes add space around the outside of the block.
Adds 12px of margin all around the outside of the block. You can also specify standard margin on certain sides:
Adds 24px of space all around the outside of the block. You can also specify double margin on certain sides:
Removes the margin space around the block. You can also specify no margin on certain sides:
Padding classes add more space within the block, around the content.
This block has 12px of padding. You can also specify standard padding on certain sides:
This block has 24px of padding. You can also specify double padding on certain sides:
This block has its padding removed. You can also remove padding on different sides of the block:
Text within a block can be aligned in certain directions.
This text is aligned left. The image is also aligned left, and the link is aligned left.
This text is aligned center. The image is also aligned center, and the link is aligned center.
This text is aligned right. The image is also aligned right, and the link is aligned right.
Call to Action Links
The "Call to Action Link" (or CTA) block may be called a "Button" on your site configuration. While these look like buttons, they are actually links and should be referred to as such to avoid miscommunication. The term button has a specific semantic role in HTML, so it behaves and announces differently for assistive technology users.
There are a number of custom classes that can be added to these blocks to change the size, color, and shape of the link. The bolded text above each button is the class that can be added to the "Custom classes" field in Drupal.
Additionally, Google analytics tracking events can be added to CTA links via Layout Builder.
Item one content
Content for item two
Here is stuff for item three
Displays time left before an event or other timed content.
Countdown to Something
Larger clickable areas--can contain images, brief description, and related terms. Cards do a good job highlighting staff profiles, upcoming events or stories.
This is a basic card with an image, some text, and some highlighted terms.
This card contains the class "color-block-title"
The title color can be changed with the classes "dark-blue" or "light-green" as well.
These charts are donuts by default, which are easier to read. However, you can transform your donut into a pie by adding "pie" to the custom classes field.
You can also change the color of your chart by adding either "light-blue" or "green" to the custom classes field.
- 44% Thing 1
- 12% Thing 2
- 15% Thing 3
- 6% Thing 4
- 3% Thing 5
- 2% Thing 6
- 2% Thing 7
- 16% Thing 8
- 44% Another thing 1
- 12% Another thing 2
- 15% Another thing 3
- 6% Another thing 4
- 3% Another thing 5
- 2% Another thing 6
- 2% Another thing 7
- 16% Another thing 8
Headlines aren't really intended for use in Layout Builder. They're intended to be used in the splash area, and have to be configured via a site-wide configuration.
However, they still appear in the list, so this is what they look like.
There are several styles of headlines available.
An image will stretch to fit it's containing section.
Note: You do not have to use an image block to get an image on a page. You can also embed images in basic and beyond basics blocks!
Image with Description
This block works really well when showcasing a collection of different items. It has options for changing the block color, as well as for flipping the block so that the picture appears on the opposite side.
Image links (formerly known as "image buttons") work well alone or in groups. They work really well when placed in a Flex Container layout, as they'll space out evenly.
If you don't want the extra styles and animations on your buttons, add "simple" to the custom class field.
This block provides a navigation list of links, either as anchors or to other pages. See How to Create an Anchor Link for linking to in-page content.
The block works best when placed before the main page content. This could be in the first section of content, and in the first column of a multi-column section. This ensures on mobile the navigation block doesn't show up below the content it's linking to.
This is a simple quote block.Name of person being quotedSomething about that person
This is a quote box with the "pullquote--editorial" class added to the custom classes field.Name of person being quotedSomething about that person
1:00 PM Opening Ceremony
Join us for the opening statements of our guest speaker. Tea and cookies will be available.
1:30 PM - 4:00 PM Breakout Rooms
Meet with some new people to go over some crazy ideas
4:00 PM Closing Ceremony
Side by Side
Gallons of Syrup
Globs of Butter
This is a basic testimonialName of personSomething about them
The white space block doesn't display anything, it just helps with adding vertical white space to desktop layouts. These blocks collapse on smaller screen sizes.
You have to add a title, but you should uncheck the "Display title" option on these blocks.