-
Notifications
You must be signed in to change notification settings - Fork 42
Layout
Core
Utility
The Layout core component helps us to layout our different components with a more standard approach using Carbon’s 2x grid r2 and pre-approved layout types.
Back links (8)
Callout (1)
- Should there be a dependency added for Layout with new
Content block (4)
- ...| If aside is true and contains children then Layout 5.3 is used to wrap...
- ...aside is not provided or missing children than Layout 5.3 is NOT included.
- rendered, the Layout utility helps lay the main content and the
- See Layout for more
Content section (3)
- _When nesting children use with the Layout utility's
8-4
and - Content Section uses the Layout core component to position
- ...content in the expected column layout. Refer to Layout
required
string
The different types allows an adopter to choose an approved layout option. The different types will layout an adopters content in different ways, and responsively behave
type | description | visual | |
---|---|---|---|
1.1 | 4-12 |
Full 16 column layout: 4 columns left, 12 columns right. | |
1.2 | 8-4 |
Intended to be nested within 12 columns. |
required
container
The children property allows the adopter to place their content within the correct column to be laid out.
optional
boolean
The nested option allows a given layout to sit comfortably within the Carbon 2x Grid allowing everything to continue to line up properly.
condition | description | ||
---|---|---|---|
3.1 | nested === true |
If nested is true do not include the .bx—grid so it can be nested within Carbon 2x Grid. Everything should still align properly. |
|
3.2 | nested === false |
If false render it as a normal Carbon 2x Grid including the .bx—grid
|
default |
optional
boolean
The optional border is displayed at the bottom of the Layout providing a visual indicator for a change of topic. Typically used when nesting the component.
condition | description | ||
---|---|---|---|
3.1 | border === true |
If border is true then the component’s border at the bottom should render. |
|
3.2 | border === false |
If border is false then the component’s border should NOT render. |
default |
optional
boolean
Optionally each column can be set to stick or be fixed to the top of the page.
condition | description | ||
---|---|---|---|
3.1 | [data-sticky=“true”] |
If a child’s data-sticky attribute is set to true then that column becomes sticky. By default it’s false . |
|
3.2 | stickyOffset === # |
The stickyOffsett number will determine how far from the top of the page in pixels it will begin its sticky journey. |
<Layout type="“4-12”">
<div data-sticky="“true”">{content for column 1}</div>
<div>{content for column 2}</div>
</Layout>
Publishing guidelines (6)
Layout component (37)
- CTA block
- CTA section
- Callout media
- Callout quote
- Callout
- Card group
- Card section carousel
- Card section images
- Card section offset
- Card section simple
- Card section
- Content block cards
- Content block horizontal
- Content block media
- Content block mixed groups
- Content block segmented
- Content block simple
- Content block
- Content group banner
- Content group cards
- Content group pictograms
- Content group simple
- Content group
- Content item horizontal
- Content item
- Content section
- Dotcom shell
- Feature section
- Lead space block
- Lead space search
- Lead space
- Link list section
- Logo grid
- Table of contents
- Tabs extended media
- Tabs extended
- Universal banner
Service (3)
UI component (34)
- Back to top
- Background media
- Button group
- CTA
- Card in card
- Card link
- Card
- Carousel
- Expressive modal
- Feature card
- Filter group
- Filter panel
- Footer
- Image with caption
- Image
- Input select
- Leaving ibm
- Lightbox media viewer
- Link list
- Link with icon
- Locale modal
- Masthead L0
- Masthead L1
- Masthead account
- Masthead mobile
- Masthead navigation
- Masthead
- Mega menu
- Pictogram item
- Quote
- Search typeahead
- Tag group
- Tag link
- Video