Informs visitors about important changes or persistent conditions. Use this component if you need to communicate to visitors in a prominent way. Banners are placed at the top of the page or section they apply to, and below the page or section header.
vf-banner vf-banner--noticevf-banner vf-banner--phasevf-banner vf-banner--alert vf-banner--info This replaces vf-banner--phasevf-banner vf-banner--alert vf-banner--successvf-banner vf-banner--alert vf-banner--alertvf-banner vf-banner--alert vf-banner--warningnote: The vf-banner--alert variants include the option to dismiss the banner. This is currently a 'bring your own JavaScript' button. To include a close button in the markup you need to make sure you have the variable banner__dismissable set to true:
banner__dismissable: true
--modal variantLike all JS-enabled components in the Visual Framework, if you wish to use the bundled JS, you need to include JS data attributes, here is an overview of what the options are for the vf-banner--modal variant.
dismissible: standard messaging typeblocking: full screenpersistent: no close buttonblocking banner state"y""myServiceName""0.1" Incrementing this string will invalidate old cookies."<a href='#'>Optional button</a><a target='_blank' href='#'>New tab button</a>"> This HTML string will be converted into VF markup for extra buttons. Optional..innerHTML of this element will be used as the markup for the message itselfAs of version 2.0.0-alpha.0 vf-banner has experimental Angular support. This package was generated with Angular version 15.2.0 and has been tested on application with Angular version 15.2.0.
Install yarn add @visual-framework/vf-banner
Import in your app.module
import { VfBannerAngularModule } from '@visual-framework/vf-banner/vf-banner.angular';
@NgModule({
imports: [VfBannerAngularModule, YourOtherModules],
...
})
Can be used as
<vf-banner [banner__variant]="'banner__info'" [banner__dismissible]="true" [banner__message]="'Here is some very, <em>very</em> <a class=\'vf-banner__link\' href=\'#\' onclick=\'return false;\'>important information</a>'"></vf-banner>
Possible combinations
| Variable | Options | Default | Release | Applicable to banner types |
|---|---|---|---|---|
| banner__message | 'basic' | |||
| banner__type | 'basic' | current | all types | |
| 'inline' | current | |||
| 'fixed' | current | |||
| 'top' | current | |||
| banner__variant | 'banner__info' | 'basic' | ||
| 'banner__warning' | ||||
| 'banner__danger' | ||||
| 'banner__success' | ||||
| banner__dismissible | true, false | false | 'basic' | |
| banner__inline_href | 'inline', 'top' | |||
| banner__text | 'fixed' | |||
| data_service_id | 'fixed' | |||
| data_protection_version | 'fixed' |
CSS to be added to your styles.scss
@import '../node_modules/@visual-framework/vf-sass-config/index.scss';
as per your banner of choice add all or some to your styles.scss
@import '../node_modules/@visual-framework/vf-banner/vf-banner.scss';
@import '../node_modules/@visual-framework/vf-banner/vf-banner--phase.scss';
@import '../node_modules/@visual-framework/vf-banner/vf-banner--alerts.scss';
@import '../node_modules/@visual-framework/vf-banner/vf-banner--fixed.scss';
@import '../node_modules/@visual-framework/vf-banner/vf-banner--gdpr.scss';
for the 'fixed' and 'top' banner type additionally add below to styles.scss
@import "../node_modules/@visual-framework/vf-badge/vf-badge.scss";
@import '../node_modules/@visual-framework/vf-button/vf-button.scss';
@import '../node_modules/@visual-framework/vf-grid/vf-grid.scss';
you should also install vf-sass-starter for the styles
Important note on 'fixed' and 'top' variants for Angular:
For the 'fixed' and 'top' variant to work properly in Angular we need to make sure we follow the below additional steps
Usage:
<vf-banner [banner__variant]="'banner__info'" [banner__dismissible]="true" [banner__message]="'Here is some very, <em>very</em> <a class=\'vf-banner__link\' href=\'#\' onclick=\'return false;\'>important information</a>'"></vf-banner>
As of version 2.0.0-alpha.2 vf-banner has experimental React support which has been tested on react version 18.2.0
Install yarn add @visual-framework/vf-banner
Import in the JS file where you want to include this component
import VfBanner from '@visual-framework/vf-banner/vf-banner.react';
Make sure you have the jsx support enabled with babel. Alternatively, you can also copy the vf-banner.react.js file from below to your react project and import as per the location.
Can be used as
<VfBanner banner__variant="banner__info" banner__dismissible="true" banner__message="Here is some very, <em>very</em> <a class='vf-banner__link' href='#' onclick='return false;'>important information</a>"/>
Possible combinations
| Variable | Options | Default | Release | Applicable to banner types |
|---|---|---|---|---|
| banner__message | 'basic' | |||
| banner__type | 'basic' | current | all types | |
| 'inline' | current | |||
| 'fixed' | current | |||
| 'top' | current | |||
| banner__variant | 'banner__info' | 'basic' | ||
| 'banner__warning' | ||||
| 'banner__danger' | ||||
| 'banner__success' | ||||
| banner__dismissible | true, false | false | 'basic' | |
| banner__inline_href | 'inline', 'top' | |||
| banner__text | 'fixed' | |||
| data_service_id | 'fixed' | |||
| data_protection_version | 'fixed' |
CSS to be added to your styles.scss
You should install vf-sass-starter for the styles and then add below code in your main SCSS file
$vf-font-plex-mono-prefix: '~@visual-framework/vf-font-plex-mono/assets';
$vf-font-plex-sans-prefix: '~@visual-framework/vf-font-plex-sans/assets';
@import '~@visual-framework/vf-box/vf-box.scss';
@import '~@visual-framework/vf-stack/vf-stack.scss';
@import '~@visual-framework/vf-u-fullbleed/vf-u-fullbleed.scss';
as per your banner of choice add all or some to your styles.scss
@import '~@visual-framework/vf-banner/vf-banner.scss';
@import '~@visual-framework/vf-banner/vf-banner--phase.scss';
@import '~@visual-framework/vf-banner/vf-banner--alerts.scss';
@import '~@visual-framework/vf-banner/vf-banner--gdpr.scss';
for the 'fixed' and 'top' banner type additionally add below to styles.scss
@import '~@visual-framework/vf-banner/vf-banner--fixed.scss';
@import "~@visual-framework/vf-badge/vf-badge.scss";
@import '~@visual-framework/vf-button/vf-button.scss';
@import '~@visual-framework/vf-grid/vf-grid.scss';
Usage:
<VfBanner banner__variant="banner__info" banner__dismissible="true" banner__message="Here is some very, <em>very</em> <a class='vf-banner__link' href='#' onclick='return false;'>important information</a>"/>
Depending on your environment you'll want to use render or include. As a rule of thumb: server-side use include, precompiled browser use render. If you're using vf-eleventy you should use include.
includeYou'll need to pass a context object from your code or Yaml file (example), as well as the path to the Nunjucks template. Nunjucks' include is an abstraction of render and provides some additional portability.
{% set context fromYourYamlFile %}
- or -
{% set context = {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
"banner__info" : true,
"banner__dismissable" : true,
"banner__message" : "Here is some very, <em>very</em> <a class="vf-banner__link" href="JavaScript:Void(0);">important information</a>",
}
%}
{% include "../path_to/vf-banner/vf-banner.njk" %}
renderThis approach is best for bare-bones Nunjucks environments, such as precompiled templates with the Nunjucks slim runtime where include is not be available.
{% render '@vf-banner', {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
"banner__info" : true,
"banner__dismissable" : true,
"banner__message" : "Here is some very, <em>very</em> <a class="vf-banner__link" href="JavaScript:Void(0);">important information</a>",}
%}
<vf-banner [banner__variant]="'banner__info'" [banner__dismissible]="true" [banner__message]="'Here is some very, <em>very</em> <a class=\'vf-banner__link\' href=\'#\' onclick=\'return false;\'>important information</a>'"></vf-banner>
<VfBanner banner__variant="banner__info" banner__dismissible="true" banner__message="Here is some very, <em>very</em> <a class='vf-banner__link' href='#' onclick='return false;'>important information</a>"/>
<div class="vf-banner vf-banner--alert vf-banner--info">
<div class="vf-banner__content">
<p class="vf-banner__text">Here is some very, <em>very</em> <a class="vf-banner__link" href="JavaScript:Void(0);">important information</a></p>
<button role="button" aria-label="close notification banner" class="vf-button vf-button--icon vf-button--dismiss | vf-banner__button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<title>dismiss banner</title>
<path d="M14.3,12.179a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.442L12.177,9.7a.25.25,0,0,1-.354,0L2.561.442A1.5,1.5,0,0,0,.439,2.563L9.7,11.825a.25.25,0,0,1,0,.354L.439,21.442a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,0,0,2.122-2.121Z" />
</svg>
</button>
</div>
</div>
Depending on your environment you'll want to use render or include. As a rule of thumb: server-side use include, precompiled browser use render. If you're using vf-eleventy you should use include.
includeYou'll need to pass a context object from your code or Yaml file (example), as well as the path to the Nunjucks template. Nunjucks' include is an abstraction of render and provides some additional portability.
{% set context fromYourYamlFile %}
- or -
{% set context = {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
"banner__warning" : true,
"banner__dismissable" : true,
"banner__message" : "Easy now, easy does it. <a class="vf-banner__link" href="JavaScript:Void(0);">link example</a>",
}
%}
{% include "../path_to/vf-banner/vf-banner.njk" %}
renderThis approach is best for bare-bones Nunjucks environments, such as precompiled templates with the Nunjucks slim runtime where include is not be available.
{% render '@vf-banner', {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
"banner__warning" : true,
"banner__dismissable" : true,
"banner__message" : "Easy now, easy does it. <a class="vf-banner__link" href="JavaScript:Void(0);">link example</a>",}
%}
<vf-banner [banner__variant]="'banner__warning'" [banner__dismissible]="true" [banner__message]="'Easy now, easy does it. <a class=\'vf-banner__link\' href=\'JavaScript:Void(0);\'>link example</a>'"></vf-banner>
<VfBanner banner__variant="banner__warning" banner__dismissible="true" banner__message="Easy now, easy does it. <a class='vf-banner__link' href='JavaScript:Void(0);'>link example</a>"/>
<div class="vf-banner vf-banner--alert vf-banner--warning">
<div class="vf-banner__content">
<p class="vf-banner__text">Easy now, easy does it. <a class="vf-banner__link" href="JavaScript:Void(0);">link example</a></p>
<button role="button" aria-label="close notification banner" class="vf-button vf-button--icon vf-button--dismiss | vf-banner__button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<title>dismiss banner</title>
<path d="M14.3,12.179a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.442L12.177,9.7a.25.25,0,0,1-.354,0L2.561.442A1.5,1.5,0,0,0,.439,2.563L9.7,11.825a.25.25,0,0,1,0,.354L.439,21.442a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,0,0,2.122-2.121Z" />
</svg>
</button>
</div>
</div>
Depending on your environment you'll want to use render or include. As a rule of thumb: server-side use include, precompiled browser use render. If you're using vf-eleventy you should use include.
includeYou'll need to pass a context object from your code or Yaml file (example), as well as the path to the Nunjucks template. Nunjucks' include is an abstraction of render and provides some additional portability.
{% set context fromYourYamlFile %}
- or -
{% set context = {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
"banner__danger" : true,
"banner__dismissable" : true,
"banner__message" : "Oh dear, what have you done? <a class="vf-banner__link" href="JavaScript:Void(0);">link example</a>",
}
%}
{% include "../path_to/vf-banner/vf-banner.njk" %}
renderThis approach is best for bare-bones Nunjucks environments, such as precompiled templates with the Nunjucks slim runtime where include is not be available.
{% render '@vf-banner', {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
"banner__danger" : true,
"banner__dismissable" : true,
"banner__message" : "Oh dear, what have you done? <a class="vf-banner__link" href="JavaScript:Void(0);">link example</a>",}
%}
<vf-banner [banner__variant]="'banner__danger'" [banner__message]="'Oh dear, what have you done? <a class=\'vf-banner__link\' href=\'JavaScript:Void(0);\'>link example</a>'"></vf-banner>
<VfBanner banner__variant="banner__danger" banner__message="Oh dear, what have you done? <a class='vf-banner__link' href='JavaScript:Void(0);'>link example</a>"/>
<div class="vf-banner vf-banner--alert vf-banner--danger">
<div class="vf-banner__content">
<p class="vf-banner__text">Oh dear, what have you done? <a class="vf-banner__link" href="JavaScript:Void(0);">link example</a></p>
<button role="button" aria-label="close notification banner" class="vf-button vf-button--icon vf-button--dismiss | vf-banner__button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<title>dismiss banner</title>
<path d="M14.3,12.179a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.442L12.177,9.7a.25.25,0,0,1-.354,0L2.561.442A1.5,1.5,0,0,0,.439,2.563L9.7,11.825a.25.25,0,0,1,0,.354L.439,21.442a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,0,0,2.122-2.121Z" />
</svg>
</button>
</div>
</div>
Depending on your environment you'll want to use render or include. As a rule of thumb: server-side use include, precompiled browser use render. If you're using vf-eleventy you should use include.
includeYou'll need to pass a context object from your code or Yaml file (example), as well as the path to the Nunjucks template. Nunjucks' include is an abstraction of render and provides some additional portability.
{% set context fromYourYamlFile %}
- or -
{% set context = {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
"banner__success" : true,
"banner__dismissable" : true,
"banner__message" : "Congratulations! You have made something <a class="vf-banner__link" href="JavaScript:Void(0);">awesome</a>!",
}
%}
{% include "../path_to/vf-banner/vf-banner.njk" %}
renderThis approach is best for bare-bones Nunjucks environments, such as precompiled templates with the Nunjucks slim runtime where include is not be available.
{% render '@vf-banner', {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
"banner__success" : true,
"banner__dismissable" : true,
"banner__message" : "Congratulations! You have made something <a class="vf-banner__link" href="JavaScript:Void(0);">awesome</a>!",}
%}
<vf-banner [banner__variant]="'banner__success'" [banner__dismissible]="false" [banner__message]="'Congratulations! You have made something <a class=\'vf-banner__link\' href=\'JavaScript:Void(0);\'>awesome</a>!'"></vf-banner>
<VfBanner banner__variant="banner__success" banner__dismissible="false" banner__message="Congratulations! You have made something <a class='vf-banner__link' href='JavaScript:Void(0);'>awesome</a>!"/>
<div class="vf-banner vf-banner--alert vf-banner--success">
<div class="vf-banner__content">
<p class="vf-banner__text">Congratulations! You have made something <a class="vf-banner__link" href="JavaScript:Void(0);">awesome</a>!</p>
<button role="button" aria-label="close notification banner" class="vf-button vf-button--icon vf-button--dismiss | vf-banner__button">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<title>dismiss banner</title>
<path d="M14.3,12.179a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.442L12.177,9.7a.25.25,0,0,1-.354,0L2.561.442A1.5,1.5,0,0,0,.439,2.563L9.7,11.825a.25.25,0,0,1,0,.354L.439,21.442a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,0,0,2.122-2.121Z" />
</svg>
</button>
</div>
</div>
Depending on your environment you'll want to use render or include. As a rule of thumb: server-side use include, precompiled browser use render. If you're using vf-eleventy you should use include.
includeYou'll need to pass a context object from your code or Yaml file (example), as well as the path to the Nunjucks template. Nunjucks' include is an abstraction of render and provides some additional portability.
{% set context fromYourYamlFile %}
- or -
{% set context = {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
}
%}
{% include "../path_to/vf-banner/vf-banner.njk" %}
renderThis approach is best for bare-bones Nunjucks environments, such as precompiled templates with the Nunjucks slim runtime where include is not be available.
{% render '@vf-banner', {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
}
%}
For 'top' variant - <vf-banner [banner__type]="'top'" [banner__inline_href]="'JavaScript:Void(0);'"></vf-banner> For 'fixed' variant - <vf-banner [banner__type]="'fixed'" [banner__text]="'I agree, dismiss this banner'"></vf-banner>
For 'top' variant - <VfBanner banner__type="top" banner__inline_href="JavaScript:Void(0);"/> For 'fixed' variant - <VfBanner banner__type="fixed" banner__text="I agree, dismiss this banner"/>
<!-- dismissible banner -->
<div class="vf-banner vf-banner--fixed vf-banner--bottom vf-banner--notice" data-vf-js-banner data-vf-js-banner-state="dismissible" data-vf-js-banner-button-text="I agree, dismiss this banner" data-vf-js-banner-cookie-name="NaN" data-vf-js-banner-cookie-version="NaN" data-vf-js-banner-extra-button="<a href='#'>Optional button</a><a target='_blank' href='#'>New tab button</a>" data-vf-js-banner-auto-accept="false">
<div class="vf-banner__content | vf-grid" data-vf-js-banner-text>
<p class="vf-banner__text vf-banner__text--lg">
This website uses cookies, and the limiting processing of your personal data to function. By using the site you are agreeing to this as outlined in our <a class="vf-banner__link" href="JavaScript:Void(0);">Privacy Notice</a> and <a class="vf-banner__link" href="JavaScript:Void(0);">Terms Of Use</a>.
</p>
</div>
</div>
<!-- persistent banner -->
<!-- <div class="vf-banner vf-banner--fixed vf-banner--bottom vf-banner--notice"
data-vf-js-banner
data-vf-js-banner-state="persistent"
data-vf-js-banner-extra-button="<a href='#'>Optional button</a><a target='_blank' href='#'>New tab button</a>">
<div class="vf-banner__content | vf-grid" data-vf-js-banner-notice-text>
<p class="vf-text vf-text-body--2">
A persistent banner <a class="vf-link" href="JavaScript:Void(0);">Privacy Notice</a> and <a class="vf-link" href="JavaScript:Void(0);">Terms Of Use</a>.
</p>
</div>
</div> -->
<!-- Blocking, dismissible banner -->
<!-- <div class="vf-banner vf-banner--blocking vf-banner--notice"
data-vf-js-banner
data-vf-js-banner-state="blocking" data-vf-js-banner-esc-close="y"
data-vf-js-banner-cookie-name="NaN"
data-vf-js-banner-cookie-version="NaN">
<div class="vf-banner__content | vf-grid" data-vf-js-banner-notice-text>
<div class="vf-box">
<h2 class="vf-text vf-text-heading-2">A blocking banner</h2>
<p class="vf-text vf-text-body--3">This might have a richer layout. Note, this implementation is not yet feature complete.</p>
</div>
</div>
</div> -->
<!-- programmatic banner -->
<!-- <div class="vf-banner vf-banner--fixed vf-banner--bottom vf-banner--notice"
data-vf-js-banner-id="32423"
></div> -->
Depending on your environment you'll want to use render or include. As a rule of thumb: server-side use include, precompiled browser use render. If you're using vf-eleventy you should use include.
includeYou'll need to pass a context object from your code or Yaml file (example), as well as the path to the Nunjucks template. Nunjucks' include is an abstraction of render and provides some additional portability.
{% set context fromYourYamlFile %}
- or -
{% set context = {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
}
%}
{% include "../path_to/vf-banner/vf-banner.njk" %}
renderThis approach is best for bare-bones Nunjucks environments, such as precompiled templates with the Nunjucks slim runtime where include is not be available.
{% render '@vf-banner', {
"component-type" : "container",
"data-service-id" : "MyService",
"data-protection-version" : 0.1,
"banner__text" : "I agree, dismiss this banner",
"banner__link" : ,
"banner__inline_href" : "JavaScript:Void(0);",
"alert_icon_text" : "dismiss",
}
%}
For 'top' variant - <vf-banner [banner__type]="'top'" [banner__inline_href]="'JavaScript:Void(0);'"></vf-banner> For 'fixed' variant - <vf-banner [banner__type]="'fixed'" [banner__text]="'I agree, dismiss this banner'"></vf-banner>
For 'top' variant - <VfBanner banner__type="top" banner__inline_href="JavaScript:Void(0);"/> For 'fixed' variant - <VfBanner banner__type="fixed" banner__text="I agree, dismiss this banner"/>
<div class="vf-banner vf-banner--fixed vf-banner--top vf-banner--phase" data-vf-js-banner data-vf-js-banner-state="dismissible" data-vf-js-banner-button-text="Close notice" data-vf-js-banner-button-theme="primary">
<div class="vf-banner__content" data-vf-js-banner-text>
<span class="vf-badge vf-badge--primary">BETA</span>
<p class="vf-banner__text">This is the new EMBL.org <a href="JavaScript:Void(0);" class="vf-banner__link">Complete our quick survey</a> to help us make it better.</p>
</div>
</div>
This repository is distributed with npm. After installing npm, you can install primer-buttons with this command.
$ yarn add --dev @visual-framework/vf-banner
The style files included are written in Sass. If you're using a VF-core project, you can import it like this:
@import "@visual-framework/vf-banner/index.scss";
Make sure you import Sass requirements along with the modules. You can use a project boilerplate or the vf-sass-starter
--inline variant Nunjucks template file cleanup.vf-data-protection-banner__text -> banner__textvf-data-protection-banner__link -> banner__linkvf-banner--inline_href -> banner__inline_href--phase variant.set- style functions to cleaner versionvf-button--primary (if a specific button variant has been requested by vfJsBannerButtonTheme, it will still be used)v2.0.0 of the vf-design-tokens package or newerconsole.logvf-banner classvf-banner__content classvf-banner__content if parent has vf-u-fullbleed classvf-banner__button.vf-banner__link--alert and --warning bannersvf-banner--phase is on its way to deprecation, use vf-banner--info insteadvf-banner__textvf-text is deprecatedvf-text components inside--phase variant
File system location: components/vf-banner
Find an issue on this page? Propose a change or discuss it.