Provides base margins and responsive layout logic for pages
CdrContainer is a simple wrapper that provides basic responsive layout logic. The padding and margin applied by CdrContainer is designed to align with the header and footer in the REI page template. This component provides the same functionality as the cdr-container
or cdr-container-fluid
mixins from @rei/cdr-tokens
but wrapped in a Vue component for ease of use. Note that the example below needs to be opened in CodeSandbox to see the full static vs. fluid behavior.
Usage of the tag
prop should semantically match the layout of your page. In general, the default tag value div
will work for the majority of use cases.
The default static
CdrContainer has a flexible content width up to a max width of 1232px which corresponds to our large
breakpoint, while the fluid
CdrContainer has no max-width. See the responsive foundations article for more information on container usage.
<cdr-container>
page content
</cdr-container>
<div class="full-width-content">
full screen width content
</div>
<cdr-container>
more page content
</cdr-container>
tag
name
string
type
'div'
default
modifier
name
string
type
'static'
default
Controls whether container is static or fluid width. Possible values: { 'static' | 'fluid' }
Find more information about using Slots in the article Installing Cedar.
default
name
Slot for CdrContainer content.