Layouts
On this page
Overview
A Flair layout controls where promotions appear on your Shopify pages and how several promotions behave together. Layouts handle positioning and margins, stacking limits and direction, grouping by tag, and whether variant promotions are enabled.
You can use layouts throughout your store to control how Flair promotions display. See How to Apply Flair Layouts.
Name
Enter a descriptive name for your layout. The layout name can be used during Flair setup (see How to Apply Flair Layouts).
Note: The name may only contain letters, numbers and spaces.
Default Settings
By page type
Select page types to use this layout when no layout is set.
The following page types are supported:
- Home
- Product
- Collection
- Search
- Cart
Use as default
Check the Use as default checkbox to use this layout when no layout is set, or if an invalid layout is specified.
Promotion Settings
Group promotions
Display a specific group of badges or banners based on tags.
- Show all badges/banners - Show all items.
- Include badges/banners with tags - Only show items with the specified tags.
- Exclude badges/banners with tags - Only show items without the specified tags.
Stack promotions
Display multiple badges or banners at the same time.
Maximum
Select the maximum number of badges or banners to show.
When more promotions qualify than the maximum allows, those with the highest priority show first.
Direction
Show in a row:
Or in a column:
Gap
The space between items in the stack.
Variant promotions
Promote specific variants with badges or banners.
- Disabled - disable variant promotions; Flair display rules and dynamic text will be based on all product variants
- Enabled - enable variant promotions; Flair display rules and dynamic text will use the selected variant if available. If no variant is selected, promotions will use the product totals across all variants.
See the Flair Variants guide for more information about variant promotions.
Display Settings
Position
- default - show within the normal flow of the page
- absolute - position absolutely on top of other elements, such as product images; only available for badges
Note: The absolute position needs to be placed inside of a relative container.
Alignment horizontal
On the left:
Or in the center:
Or on the right:
Alignment vertical
This option only applies for the absolute position.
On the top:
Or on the bottom:
Margin
Add spacing around the layout.
Z-index
This option only applies for the absolute position.
The z-index allows you move the layout above or below other items on your page. Elements with a higher z-index value will be placed on top of elements with a lower z-index value.
How to Apply Flair Layouts
Learn how to apply Flair layouts. We recommend specifying layouts by name.
Using the layout name
You can specify the layout by name when setting up Flair in your theme.
The details depend on how you installed Flair.
Using the Shopify theme editor
For Flair badges and banners installed via Online Store > Themes > Edit theme, set the Layout inside of the app block like so:
Using Flair web components
Set the layout name using the layout attribute:
Flair badges example
<flair-badges layout="Collections"></flair-badges>
Flair banners example
<flair-banners layout="Collections"></flair-banners>
See also the Flair web components guide.
Using default settings
You can also use layout Default Settings to auto-apply layouts. If no layout is specified, or the specified layout is missing, Flair uses the layout auto-applied to that page type, otherwise the default layout.
Frequently Asked Questions
How do I show more than one Flair badge on a product?
Increase the maximum number of promotions in your layout's Stack promotions settings.
How do I show only certain badges on certain pages?
Use Group promotions in your layout to include or exclude badges by tag. You can also configure different layouts for different page types.
How do I show specific badges or banners in a layout?
First, tag your badges or banners based on which layout should show them, such as "below title" or "top left". Then create or edit the layout to show badges or banners based on those tags, so each layout shows a different group.
How do I position a Flair badge on top of a product image?
Set your layout's Position to Absolute, then adjust alignment and spacing to place the badge over the image.
How do I specify a Flair layout?
Select the layout by name in the Layout setting of your theme app block, or with the layout attribute on a Flair web component. You can also use Default Settings to auto-apply a layout by page type, or as the default fallback for everything else.