Pillar

Use the pillar component to group related content together.

import {Pillar} from '@primer/react-brand'

Examples

Default

The default Pillar displays a heading and description.

Loading

Icon

You can add an icon to enhance the visual context. We recommend using an Octicon. The icon defaults to a green presentation and can be customized using the size and hasBackground props. For custom SVG artwork or logos, set hasBackground to false to render the icon without the shared square icon frame.

Loading

Image

You can add an image to enhance the visual context.

Loading

Border

You can add an optional border to create a visual boundary around the pillar content.

Loading

You can add an external link to the Pillar using the Link component.

Loading

Align

The content alignment can be changed using the align prop on the root Pillar. This can be configured to either start or center.

Loading

Stacked Pillars

Use the Stack component to stack multiple Pillars horizontally or vertically.

Loading

Component props

Pillar

nametypedefaultrequireddescription
alignstart, centerstartfalseAligns the pillar content
as'div'
'article'
'div'falseThe HTML element used to render the pillar.

Pillar.Icon

nametypedefaultrequireddescription
iconReact.NodetrueOcticon
size'small', 'medium', 'large', 20, 24, 28, 32, 36, 40, 4432falseThe size of the icon
hasBackgroundbooleantruefalseAdds a filled colored background to the icon. Set to false for custom artwork that should not use the shared square icon frame.

Supports the Icon component props, excluding color.

Pillar.Image

Forwards all the props from the Image component, including src, alt, and aspectRatio.

Pillar.Heading

nametypedefaultrequireddescription
ash2, h3, h4, h5, h6h3false
classNamestringfalseCustom class name for the heading component
childrenReactNode, ReactNode[]undefinedtrueContent to be displayed inside the heading component.

Forwards all the props from the Heading component, including as, size, and weight.

Pillar.Description

Optional node that can be used to provide a description for the section.

nametypedefaultrequireddescription
childrenReactNode, ReactNode[]undefinedtrueContent to be displayed inside the pillar component

id, className and ref are forwarded by default to all children.

Optional node that can be used to provide a link.

nametypedefaultrequireddescription
classNamestringundefinedfalseSets a custom class on the root element
hrefstringtrueLocal identifier for the anchored element

id, className and ref are forwarded by default to all children.