Tags

Information

Folder
src/components/elements/tags

Files

Schema
// src/components/elements/tags/schema.yaml

$schema: http://json-schema.org/draft-07/schema#
$id: /elements/tags
additionalProperties: false
properties:
  links:
    type: array
    items:
      type: object
      properties:
        url:
          type: string
          format: uri-reference
        label:
          type: string
      required:
        - label
        - url
required:
  - links
Mocks
// src/components/elements/tags/mocks.yaml

links:
  - label: Fleisch
    url: '#meat'
  - label: Handel
    url: '#trade'
  - label: Landwirtschaft
    url: '#agriculture'
Template
// src/components/elements/tags/tags.html.twig

<ul class="Tags{% if class %} {{ class }}{% endif %} u-typo-label-small">
  {% for item in links %}
    <li class="Tags-tag">
      <a href="{{ item.url }}" class="Tags-link Tracking--tagsLink u-brandLink">{{ item.label }}</a>
    </li>
  {% endfor %}
</ul>

Variants

default
Open