Section

Use the section component to group related content together.
  • Experimental
  • Not reviewed for accessibility
import {Section} from '@primer/react-brand'

Examples

Default

The default Section wraps its content in a semantic <section> element and provides default paddings.

With indepenedent block paddings

With predefined background color

With custom background color

With background image

With multiple background images

With rounded corners

Component props

Section

nametypedefaultrequireddescription
paddingBlockStart'none', 'condensed', 'normal', 'spacious' ResponsiveMap'normal'falseControl the padding at the top of the section.
paddingBlockEnd'none', 'condensed', 'normal', 'spacious' ResponsiveMap'normal'falseControl the padding at the bottom of the section.
backgroundColor'default', 'subtle' | string ResponsiveMapfalseAdd a background color. Use a predefined color, a CSS custom property, or a custom color value.
backgroundImageSrcstring | string[] ResponsiveMapfalseAdd one or more background images.
backgroundImageSizestring | string[] ResponsiveMap'cover'falseControl the size of the background image(s). This accepts all CSS background-size supported values, including keywords like contain.
backgroundImagePositionstring | string[] ResponsiveMap'50%falseControl the position of the background image(s). This accepts all CSS background-position supported values, including keywords like top and edge offsets.