Skip to content

Primer Design System

Main navigation navigation

Eyebrow banner

Use the eyebrow banner to highlight important information at the top of a page.
  • Experimental
  • Not reviewed for accessibility
import {EyebrowBanner} from '@primer/react-brand'

Examples

Default

This is the default variant for the eyebrow banner component.

Color modes

Use ThemeProvider to automatically adjust the visual presentation of the component to light or dark variants.

Text labels

Use EyebrowBanner.Label to display a leading text for additional context.

A color prop is available to customise the color of the label.

Icon visuals

Use EyebrowBanner.Visual with an icon prop to display a leading icon for additional context.

Icons can be SVGs or ideally Octicons. If using Octicons, import the icon from @primer/octicons-react and pass it as the icon prop.

A color option is available to customise the color of the icon.

An optional hasBackground prop can be used to fill the surrounding circle with the lighter hue of the selected color.

Component props

EyebrowBanner Required

NameTypeDefaultrequiredDescription
hrefstringundefinedtrueThe URL that the eyebrow banner points to

EyebrowBanner.Heading Required

Please note that this is not a HTML-based heading element.

NameTypeDefaultrequiredDescription
childrenReactNodeundefinedtrueThe primary messaging that appears on the top-most line

EyebrowBanner.SubHeading

NameTypeDefaultrequiredDescription
childrenReactNodeundefinedfalseOptional secondary messaging that appears beneath the heading

EyebrowBanner.Visual

NameTypeDefaultrequiredDescription
icon'ReactNode'
'IconProps'
undefinedfalseOptional icon. Accepts React-based Octicons
color'default'
'blue'
'coral'
'green'
'gray'
'indigo'
'lemon'
'lime'
'orange'
'pink'
'purple'
'red'
'teal'
'yellow'
undefinedfalseOptional icon color.
hasBackgroundbooleanundefinedfalseOptional background color.
childrenReactNodeundefinedfalseAccepts img, picture or svg elements

EyebrowBanner.Label

NameTypeDefaultrequiredDescription
color'blue-purple'
'green-blue'
'pink-blue'
'purple-red'
'red-orange'
'default'
'blue'
'coral'
'green'
'gray'
'indigo'
'lemon'
'lime'
'orange'
'pink'
'purple'
'red'
'teal'
'yellow'
undefinedfalseOptional label color.
childrenReactNodeundefinedfalseText to appear in the label slot