Flex Container
Use the Flex Container to create banners, information text on a background color, or a page hero.
As the name implies, the Flex Container is a container for other components. As an editor, you can change the background color, choose between a few different layout options, and decide whether the image should bleed or not.
Bolånekalkyl – räkna på bolån
- Räkna ut hur mycket du kan låna
- Se vad ditt lån kommer att kosta varje månad
- Räkna på din lånekostnad om räntan ändras
![Happy family sitting on couch at home](/content/experience-fragments/swedbank/aem_help/components/Flex0/flex-hero/_jcr_content/root/container/flex_container_copy_/flex-container-right/imagev3.coreimg.jpeg/1715668567883/gettyimages-1134459340.jpeg)
Best practice
Hero – Top of the page
Container layout
1-1 coloumns
Components first column
- Headline
- Rich Text Editor with Bullets and Lead text
- CTA
Components second column
- Image Component
Bolånekalkyl – räkna på bolån
- Räkna ut hur mycket du kan låna
- Se vad ditt lån kommer att kosta varje månad
- Räkna på din lånekostnad om räntan ändras
![Happy family sitting on couch at home](/content/experience-fragments/swedbank/aem_help/components/Flex0/flex-hero/_jcr_content/root/container/flex_container_copy_/flex-container-right/imagev3.coreimg.jpeg/1715668567883/gettyimages-1134459340.jpeg)
Puff - middle page
Container layout
1-2 columns
Components first column
- Shape component
Components second column
- Headline
- Rich Text Editor
- CTA
Anmäl konto för elstöd och andra utbetalningar
Genom kontoregistret får du utbetalningar från företag och myndigheter direkt till ditt konto. Det kan vara till exempel utbetalning av lön från din arbetsgivare, barnbidrag från Försäkringskassan eller studiemedel från CSN. Pengarna betalas ut via Swedbanks lön- och utbetalningssystem. Du kan även lösa in din avi som du fått hemskickad.
Highlighting information – middle page
Container layout
Full width
Components in column
- Headline
- Rich Text Editor
Går kortet ut snart? Du får automatiskt ett nytt hemskickat
Om ditt kort håller på att gå ut, skickar vi automatiskt ett nytt kort till din folkbokföringsadress, förutsatt att du har följt kortvillkoren. När du har använt det nya kortet första gången och transaktionen har debiterats, spärrar vi det gamla kortet.
Headline Component
Always use a Headline Component in your Flex Container.
Hi! I'm a Headline Component
Rich Text Editor
Use Rich Text Editor (RTE) for text.
Rich Text Editor
Rich Text Editor Component
Paragraph. Line break.
Paragraph. Line break.
CTA Component
Use a CTA when you want the visitors to take action.
Shape Component
Use this component when you want to put emphasis on something that is not a headline.
Image Component
Images and graphics make content more pleasant and easier to understand.
Image Component
![](/adobe/dynamicmedia/deliver/dm-aid--b1de6c54-0951-45df-9867-202bf842b505/kids-bubbles.jpg?preferwebp=true&quality=82)
Decorative Text Component
Use it when you want to highlight a phrase or quote, but please keep in mind – it's not a proper headline.
This is how decorative text behaves: a few words are highlighted and always appear together.
When building a Flex Container with image and text – one approch is to:
- Start by building it in full width
- Then move it to the split layout
This helps you place the content in the correct columns and avoid unsightly margins.
Do
![Flex container good example](/adobe/dynamicmedia/deliver/dm-aid--5f7d3a4f-21e6-4021-9168-267cbe6248d5/flex-good2.gif?preferwebp=true&quality=82)
![Group of students having a lecture in an auditorium](/adobe/dynamicmedia/deliver/dm-aid--a3c27ecc-3b24-4bff-a71b-a9a076657609/20230227-swedbank-aulan-l-ktare-379-final.jpg?preferwebp=true&quality=82)
Good design
The image component is in one column and the Headline and Rich Text Component is in the other column. The margins are fine. Beautiful!
Don't
![Flex container bad example](/adobe/dynamicmedia/deliver/dm-aid--27a8b5f5-f642-480a-b659-faf60cb668db/flex-bad2.gif?preferwebp=true&quality=82)
![Group of students having a lecture in an auditorium](/adobe/dynamicmedia/deliver/dm-aid--a3c27ecc-3b24-4bff-a71b-a9a076657609/20230227-swedbank-aulan-l-ktare-379-final.jpg?preferwebp=true&quality=82)
Bad design
Everything is in the same column so the margins are missing!
Do
- If you want to have text in two columns, you should either use two Flex containers or two Rich Text Editors in a Layout container. Depending on how much you want to highlight the content.
![text_two_columns_do](/adobe/dynamicmedia/deliver/dm-aid--6d7921e8-45cf-45b2-ac6b-0bbbae3cdd6f/text-two-columns-do.png?preferwebp=true&quality=82)
Don't
- Do not place text in both columns in a Flex container with a 1-1 layout style.
![text_two_columns_dont](/adobe/dynamicmedia/deliver/dm-aid--a652c853-201b-4ebf-8cff-559f78a8fd7c/text-two-columns-dont.png?preferwebp=true&quality=82)
There should always be a headline
There should always be a headline and it should be placed inside the Flex Container. Use either:
- Headline Component (activate -12 px)
- Heading in Rich Text Editor
Do
![Flex heading do](/adobe/dynamicmedia/deliver/dm-aid--045d5c35-5d08-4c92-bbad-003f1fdc72e7/heading-do.png?preferwebp=true&quality=82)
Don't
![Flex heading dont](/adobe/dynamicmedia/deliver/dm-aid--27ee1334-83da-45ec-98f8-ee161dcd5949/heading-dont.png?preferwebp=true&quality=82)
Headline length
- Long headline? Shorten the headline or replace the Image component with the Shape component. The Layout style should be 2-1 or 1-2, with the Shape component placed in the first section (1).
- Avoid headlines exceeding three lines.
Do
![Flex heading 2 do](/adobe/dynamicmedia/deliver/dm-aid--91175257-b7c6-4908-b0f8-330a337c1e93/heading-2-do.png?preferwebp=true&quality=82)
Don't
![Flex heading 2 dont](/adobe/dynamicmedia/deliver/dm-aid--f92db112-42b2-4367-b0fb-167bc5581d14/heading-2-dont.png?preferwebp=true&quality=82)
Do
- Place the image in the top column and the text in the column below.
- Preferably use a Teaser component if there are links.
Don't
- The headline and text should not be positioned above the image.
- Never place an image in the same c-column as the headline and text.
Do
- Flex container Layout: 1-1
- Always with Padding.
![Flex padding flex](/adobe/dynamicmedia/deliver/dm-aid--ea70f255-b9f5-4700-aed2-88333e763619/padding-flex.png?preferwebp=true&quality=82)
Don't
- Never use without padding.
![Flex no padding](/adobe/dynamicmedia/deliver/dm-aid--9fad5a40-b5e2-4b6c-87fb-b008527203b0/no-padding-flex.png?preferwebp=true&quality=82)
Do
- Guiding graphic and Spots should always be used within a Flex container.
![Flex graphic do](/adobe/dynamicmedia/deliver/dm-aid--fd9abd87-d636-40ba-9c88-2252eb6ed735/flex-graphic-do.png?preferwebp=true&quality=82)
Don't
- They should never be used independently (without a Flex container).
![Flex graphic dont](/adobe/dynamicmedia/deliver/dm-aid--d9951fe4-8902-4ad9-a87c-1e6e89b0e624/flex-graphic-dont.png?preferwebp=true&quality=82)
Configuration in AEM
No padding (default)
The image will bleed to the borders of the area in the Flex Container.
Use for
- Images of people
Padding
The padding option should only be used in special cases when the image or design demands it.
Use for
- Credit card images
- Guiding graphic, also known as Spots
Note: No padding applies to everything in the same column as the image. Therefore, never put content in the same column as the image, as this will mess up the margins and break the design.
![Flex padding](/adobe/dynamicmedia/deliver/dm-aid--10119acc-9c67-4f54-b60e-5395ebd8b799/flex-padding.png?preferwebp=true&quality=82)
Flex must have a background color. We have six different background color options.
- Apricot (default)
- Peach
- Sky
- Mist
- Rose
- Thistle
![Flex background colors](/adobe/dynamicmedia/deliver/dm-aid--83d6a2c9-eaf2-4e61-8aa5-681f19285264/flex-background-colors.png?preferwebp=true&quality=82)
The component has four layout options.
- 1-1 columns (default) - Always use for images
- 2-1 columns - Always use for Shape and place it in 1 column
- 1-2 columns - Always use for Shape and place it in 1 column
- Full width
![Flex layout options](/adobe/dynamicmedia/deliver/dm-aid--8d61f166-a9cd-4145-8778-a549cc3eef4b/flex-layout-options.png?preferwebp=true&quality=82)