Section
Use the section component to group related content together.
import {Section} from '@primer/react-brand'
The default Section
wraps its content in a semantic <section>
element and provides default paddings.
name | type | default | required | description |
---|---|---|---|---|
paddingBlockStart | 'none' , 'condensed' , 'normal' , 'spacious' ResponsiveMap | 'normal' | false | Control the padding at the top of the section. |
paddingBlockEnd | 'none' , 'condensed' , 'normal' , 'spacious' ResponsiveMap | 'normal' | false | Control the padding at the bottom of the section. |
backgroundColor | 'default' , 'subtle' | string ResponsiveMap | false | Add a background color. Use a predefined color, a CSS custom property, or a custom color value. | |
backgroundImageSrc | string | string[] ResponsiveMap | false | Add one or more background images. | |
backgroundImageSize | string | string[] ResponsiveMap | 'cover' | false | Control the size of the background image(s). This accepts all CSS background-size supported values, including keywords like contain . |
backgroundImagePosition | string | string[] ResponsiveMap | '50% | false | Control the position of the background image(s). This accepts all CSS background-position supported values, including keywords like top and edge offsets. |