@ecl/twig-component-hero-banner

3.13.0 • Public • Published

ECL Hero Banner

npm package: @ecl/twig-component-hero-banner

npm install --save @ecl/twig-component-hero-banner

Parameters

  • "variant" (string) (default: 'primary') Variant of banner (can be 'primary', 'seconary, 'white', image','image-shade','image-gradient')
  • "title" (string) (default: '') Title of banner
  • "image" (string) (default: '') Image for banner (required for image banner type)
  • credit (string) (default: '') Credit for the image
  • "description" (string) (default: '') Description of banner
  • "centered" (bool) (default: true) Define if banner should be centered
  • "full_width" (bools) (default: false) Extends the banner to whole viewport when used inside the grid
  • "link" (associative array) (default: predefined structure) predefined structure for the Link component
  • "extra_classes" (optional) (string) (default: '') Extra classes (space separated)
  • "extra_attributes" (optional) (array) (default: []) Extra attributes
    • "name" (string) Attribute name, eg. 'data-test'
    • "value" (string) Attribute value, eg: 'data-test-1'

Example:

{% include '@ecl/hero-banner/hero-banner.html.twig' with {  
  title: 'EU Budget for the future',  
  description: 'The European Commission has put forward ambitious yet realistic proposals for a modern EU budget. It is time for an EU budget that reflects rapid developments in innovation, the economy, the environment and geopolitics, amongst others.',  
  centered: true,  
  variant: 'image',  
  image: 'url/path-to-image',  
  credit: '© Copyright',
  link: {  
    link: {  
      label: 'Subscribe',  
      icon_position: 'after',  
    },  
    icon: {  
      path: 'path-to-the-icon-file',  
      ...  
    },  
  },  
} %}

Package Sidebar

Install

npm i @ecl/twig-component-hero-banner

Weekly Downloads

5

Version

3.13.0

License

EUPL-1.2

Unpacked Size

19.7 kB

Total Files

4

Last publish

Collaborators

  • papegaill
  • yhuard
  • kalin.chernev
  • weslito
  • emeryro
  • planctus