Skip to main content

Section

The <Section> tag is required for all components. It is a block-level tag that renders as an element in the outputted HTML.

Attributes

The <section> tag has the following attributes:

AttributeTypeRequiredDescription
dataRefDataLocatorRequiredThe data-element storing the section's configuration.
classNamestringOptionalA hard-coded class name to add to the rendered element (Default: none).
defaultPaddingTopnumberOptionalA number from 0-10 indicating the default top padding of the Section Box-Wrapper (Default: 8).
defaultPaddingRightnumberOptionalA number from 0-10 indicating the default right padding of the Section Box-Wrapper (Default: 2).
defaultPaddingBottomnumberOptionalA number from 0-10 indicating the default bottom padding of the Section Box-Wrapper (Default: 8).
defaultPaddingLeftnumberOptionalA number from 0-10 indicating the default right padding of the Section Box-Wrapper (Default: 2).
defaultMaxWidthnumberOptionalA number indicating the default max width in px of the Section Box-Wrapper (Default: 1200).
defaultTextAlignmentstringOptionalA string ("left", "right", or "center") indicating the default alignment of the Section Box-Wrapper (Default: "center").
defaultTextThemestringOptionalA string ("dark-bg" or "light-bg") indicating the default text theme to use for the component.
defaultBackgroundColorstringOptionalA CSS color value indicating the default background color (Default: none).
enableHeaderbooleanOptionalWhen true, allows content authors to add a section-header to this section type (Default: false)).
locationarray/stringOptionalWhere the component can appear; can include 'header', 'main', and 'footer' (Default: ['main']).
propertiesarray/objectOptionalDefines properties that content authors can configure within the page editor. For details see custom properties.

Example

An example of the section tag is shown below.

<Section dataRef={content.section} enableHeader={true}>
...
</Section>