# @ecl-twig/ec-component-link

> ECL-Twig Link

Latest version **2.39.0** (published 2021-08-17) · EUPL-1.1 license · 0 weekly downloads

## Install

```sh
npm install @ecl-twig/ec-component-link
pnpm add @ecl-twig/ec-component-link
yarn add @ecl-twig/ec-component-link
bun add @ecl-twig/ec-component-link
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.39.0 |
| Published | 2021-08-17 |
| First published | 2019-06-14 |
| Weekly downloads | 0 |
| License | EUPL-1.1 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 20.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 18 |
| Author | European Commission |
| Maintainers | yhuard, planctus, kalin.chernev |
| Keywords | ecl, europa-component-library, design-system, twig |

## Links

- npm: https://www.npmjs.com/package/@ecl-twig/ec-component-link
- Repository: https://github.com/ec-europa/ecl-twig
- Issues: https://github.com/ec-europa/ecl-twig/issues
- npm.io page: https://npm.io/package/@ecl-twig/ec-component-link

## Dependencies (1)

- [@ecl-twig/ec-component-icon](https://npm.io/package/@ecl-twig/ec-component-icon.md) 2.39.0

## Recent versions

- 2.39.0 (latest) — 2021-08-17
- 2.38.0 — 2021-05-05
- 2.37.0 — 2021-03-08
- 2.36.0 — 2021-02-15
- 2.35.2 — 2021-02-09
- 2.35.1 — 2020-12-21
- 2.35.0 — 2020-11-27
- 2.34.0 — 2020-10-08
- 2.33.2 — 2020-10-01
- 2.33.1 — 2020-09-29
- 2.33.0 — 2020-09-18
- 2.32.0 — 2020-09-03
- 2.31.1 — 2020-08-24
- 2.31.0 — 2020-07-28
- 2.30.0 — 2020-07-22
- … 29 more at https://npm.io/package/@ecl-twig/ec-component-link/versions

## README

# ECL-Twig Link component

npm package: `@ecl-twig/ec-component-link`

```shell
npm install --save @ecl-twig/ec-component-link
```

### Parameters

- **"link"** (associative array) (default: 'predefined structure below')
  - "type" (string) (default: '') - type of link. Available types are 'default' or standalone
  - "label" (string) (default: '') - Content of link
  - "path" (string) (default: '') - Link url (href attribute)
  - "aria_label" (string) Aria label attribute value
  - "icon_position" (string) (default: 'after') - Position of link icon (can be 'before' or 'after') if icon is available
- **"icon"** (optional) (associative array) OR (array) of associate arrays - Default structure of the icon component, but extra_classes is an internal key.
  The name has to be non empty for the icon to be printed.
- **"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

### Example:

<!-- prettier-ignore -->
```twig
{% include '@ecl-twig/ec-component-link/ecl-link.html.twig' with { 
  link: { 
    type: 'standalone', 
    label: 'Standalone link', 
    path: 'http://google.com', 
    icon_position: 'after' 
    aria_label: 'An aria label' 
  }, 
  icon: { 
    path: '/path-to-the-icon-file', 
    type: 'ui', 
    name: 'external', 
    extra_classes: 'my-extra-class-1 my-extra-class-2' 
  }, 
  extra_classes: 'my-extra-class-1 my-extra-class-2', 
  extra_attributes: [ 
    { name: 'data-test', value: 'data-test-value' }, 
    { name: 'data-test-1', value: 'data-test-value-1' } 
  ] 
} %}
```

---
_Source: https://npm.io/package/@ecl-twig/ec-component-link · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
