npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ecl-twig/ec-component-card

v2.39.0

Published

ECL-Twig Card

Readme

ECL-Twig Card component

npm package: @ecl-twig/ec-component-card

npm install --save @ecl-twig/ec-component-card

Parameters

  • "card" (associative array) (default: predefined structure below)
    • "type" (string) (default: '') - Card type ('tile')
    • "description" (string) (default: '') - Description of card
    • "meta" (array) (default: []) - Meta's for the Card
    • "title" (associative array) (default: {}) - Predefined structure compatible with Link component. If Card type is a 'tile', only label property is required.
    • "image" (associative array) (default: ''): - Url/path and alternate text of the background image (non required if Card type is a 'tile')
    • "tags" (array) (default: []): List of tags compatible with EC Tag component structure
    • "infos" (array) (default: []): List of infos. The format of each element in the array:
      • "label" (string) (default: ''): Label of info
      • "icon" (associative array) (default: {}): Predefined structure compatible with EC Icon
    • "links" (array) (default: []): List of links (required if Card type is a 'tile'). The format of each element in the array
      • "label" (string) (default: ''): Label of link
      • "path" (string) (default: ''): Link url (href attribute)
    • "lists" (array) (default: []) Array of objects of type "description list"
      • "variant" (optional) (taxonomy or horizontal)
      • "items" (array)
        • term (string)
        • definition (string, array of strings or array of objects)
  • "icon_path" (string) (default: '') Path to icons file
  • "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'
  • "_compliance_" (optional) (boolean) (default: false) Activates debug
  • "_compliance_inner_check_" (optional) (boolean) (default: false) Inline compliance report
{% include '@ecl-twig/ec-component-card/ecl-card.html.twig' with { 
  card: { 
    type: 'tile', 
    description: 'Transparently designing and evaluating evidence-based EU legislation, backed by citizens views.', 
    image: { 
      src: 'https://v2--europa-component-library.netlify.com/example-image.jpg', 
      alt: 'Better regulation', 
    }, 
    title: { 
      type: 'standalone', 
      path: '/example', 
      label: 'Better regulation', 
    }, 
    meta: [ 'Meta 1', 'Meta 2', 'Meta 3' ], 
    infos: [ 
      { 
        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', 
        }, 
      }, 
    ], 
    tags: [ 
      { 
        label: 'Tag 1', 
        path: '/example-1', 
      }, 
      { 
        label: 'Tag 2', 
        path: '/example-2', 
      }, 
      { 
        label: 'Tag 3', 
        path: '/example-3', 
      }, 
    ], 
  } 
} %}