A banner is a 1-line, full color, full width container that can be used to communicate short snippets of information to users. Banners are un-intrusive and non-dismissible.
Read more about Button in the PatternFly Elements Banner documentation
Load <pf-v5-banner> via CDN:
<script src="https://jspm.dev/@patternfly/elements/pf-v5-banner/pf-v5-banner.js"></script>Or, if you are using NPM, install it
npm install @patternfly/elementsThen once installed, import it to your application:
import '@patternfly/elements/pf-v5-banner/pf-v5-banner.js';<pf-v5-banner>
Default banner
</pf-v5-banner>Banners have five different variants. The available variants are default, info, success, danger, and warning.
<pf-v5-banner variant="info">
Info banner
</pf-v5-banner>Banners can have an icon attribute for a shorthand to Patternfly Icons. To see available icons, visit the Patternfly Elements Icons documentation.
<pf-v5-banner variant="info" icon="info">
Info banner
</pf-v5-banner>Banners can be sticky, so they stick to the top of the parent.
<pf-v5-banner sticky>
Sticky banner
</pf-v5-banner>