ba-page-segment
This component is used to group related content and provide structure to our pages
Page segment with default theme
Page segment with blue-200 theme
Page segment with midnight-700 theme
This will help users understand that the content in a page segment belong together.
Further reading:
Over using the themes can result in a cluttered interface that creates visual complexity.
Further reading:
- [https://www.nngroup.com/articles/common-region/#:~:text=Caution%3A Overuse Creates Clutter](The Principle of Common Region: Containers Create Groupings - Nielsen Norman Group)
Code
Properties & Attributes
Property | Attribute | Description | Type | Default |
---|---|---|---|---|
theme |
theme |
Set's the theme for this container and all subcomponents | sale | blue-200 | midnight-500 | midnight-700 | "the-club-blue" | "the-club-bronze" | "the-club-silver" | "the-club-gold" | "the-club-gold-guest-list" | "the-club-premier" | undefined |
undefined |
Slots
Slot | Description | Permitted elements |
---|---|---|
Unnamed slot | Elements will render in the body of the component | <article> , <aside> , <ba‑accordion> , <ba‑card> , <ba‑card‑segmented> , <ba‑chart‑price> , <ba‑content> , <ba‑copy‑to‑clipboard> , <ba‑details> , <ba‑download> , <ba‑entry> , <ba‑flex> , <ba‑flight‑line> , <ba‑flight‑number> , <ba‑form> , <ba‑grid> , <ba‑image> , <ba‑link> , <ba‑link‑back> , <ba‑link‑entry> , <ba‑link‑price> , <ba‑loading‑skeleton> , <ba‑logo> , <ba‑message> , <ba‑star‑rating> , <ba‑toolbar> , <div> , <footer> , <form> , <section> |
Permitted ARIA roles
None
Usage
Basic usage
In most scenarios ba-page-segment
will be the first and only child of the <main>
element.
<main>
<ba-page-segment> ... </ba-page-segment>
<ba-page-segment> ... </ba-page-segment>
<ba-page-segment> ... </ba-page-segment>
<ba-page-segment> ... </ba-page-segment>
</main>
Note on top padding
Sibling page ba-page-segment
's with the same theme (either named or undefined) have the top padding removed
<main>
<ba-page-segment>
<!-- Has padding top and padding bottom -->
</ba-page-segment>
<ba-page-segment>
<!-- Has only padding bottom -->
</ba-page-segment>
<ba-page-segment theme="sale">
<!-- Has padding top and padding bottom -->
</ba-page-segment>
<ba-page-segment theme="sale">
<!-- Has only padding bottom -->
</ba-page-segment>
</main>