npm_versionnpm Paragon package page

A Page Banner displays an important, succinct message, and provides actions for users to address (or dismiss the banner). It requires a user action to be dismissed.

Basic Usage Variants

Any Paragon component or export may be added to the code example.

Warning Banner

The system warning banner is similar to the Alert Banner banner in styling, except that the text is always default body (14px) and padding has been modified in order to accommodate the Page Banner component. It cannot be dismissed.

Any Paragon component or export may be added to the code example.

Theme Variables#

CSS VariableComputed Value










Props API#

PageBanner Props API
  • children ReactNode Required

    An element rendered inside the Page Banner.

  • dismissible boolean

    Boolean used to control whether Page Banner is dismissible.

    Defaultfalse
  • dismissAltText string

    An element to be set as the dismiss button's alt text (preferably a translated string).

    Default'Dismiss'
  • onDismiss () => void

    A function to be called on dismiss of the Page Banner.

    Default() => {}
  • show boolean

    Boolean used to control whether the Page Banner shows.

    Defaulttrue
  • variant keyof typeof VARIANTS

    A string designating which color variant of the Page Banner to display. The full list of variants can be seen here.

    Default'accentA'

Usage Insights#

PageBanner

Project NameParagon VersionInstance Count
frontend-app-admin-portal22.20.31
frontend-app-communications23.12.21
frontend-app-communications23.12.210
frontend-app-communications23.12.21
frontend-app-course-authoring23.15.11
frontend-app-discussions23.14.22
frontend-app-learner-portal-enterprise22.17.01
frontend-app-library-authoring21.11.34
frontend-app-learner-record23.4.52