Socket
Book a DemoInstallSign in
Socket

@ecl/card

Package Overview
Dependencies
Maintainers
6
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ecl/card

ECL Card

latest
Source
npmnpm
Version
5.0.0-alpha.15
Version published
Weekly downloads
478
-1.24%
Maintainers
6
Weekly downloads
 
Created
Source

ECL Card component

npm package: @ecl/card

npm install --save @ecl/card

Parameters

  • color_mode (string) (default: '') Name of the color mode
  • picture (associative array) (default: {}): Image for the card, following ECL Picture structure
  • "picture_zoom" (bool) (default: false): Should the picture be animated?
  • labels (array) (default: []): Array of ECL Labels
  • labels_aria (string) (default: ''): Aria label for the labels area
  • primary_meta (array of strings) (default: []): Primary meta of the card
  • title (associative array OR string) (default: {}): Title of the card, following ECL Link structure
  • description (string) (default: ''): Description of the card
  • secondary_meta (array) (default: []): format: [ { label (string) (default: ''): Label of secondary meta item icon (array) (default: {}) Icon of the secondary meta, following ECL Icon structure }, ... ]
  • lists (array) (default: []): Array of ECL Description list
  • extra_classes (string) (default: '')
  • extra_attributes (array) (default: []): format: [ { name (string) (default: ''), value (optional) (string) ... ],

Example

{% include '@ecl/card/card.html.twig' with { 
  card: { 
    picture: {
      img: { 
        src: 'https://v2--europa-component-library.netlify.com/example-image.jpg', 
        alt: 'Better regulation',
      }, 
    }, 
    primary_meta: [ 'Meta 1', 'Meta 2', 'Meta 3' ], 
    title: { 
      path: '/example', 
      label: 'Better regulation', 
    }, 
    description: 'Transparently designing and evaluating evidence-based EU legislation, backed by citizens views.', 
    secondary_meta: [ 
      { 
        label: '2018/10/22', 
        icon: { 
          type: 'general', 
          name: 'calendar', 
          path: '/path-to-the-icon-file', 
        }, 
      }, 
      { 
        label: 'Luxembourg', 
        icon: { 
          type: 'general', 
          name: 'location', 
          path: '/path-to-the-icon-file', 
        }, 
      }, 
    ], 
  } 
} %}

Keywords

ecl

FAQs

Package last updated on 15 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts