downloads

Information

Folder
src/components/patterns/downloads

Files

Schema
// src/components/patterns/downloads/schema.yaml

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

items:
  - label: Download 1
    url: url
  - label: Download 2
    url: url
  - label: Download 3
    url: url
Template
// src/components/patterns/downloads/downloads.twig

<ul class="Downloads">
	{% for item in items %}
		<li class="Downloads-item">
			<a href="{{ item.url }}" class="Downloads-link u-brandLink" target="_blank">
				{% include "@elements/icon/icon.twig" with {name: "download"} only %}
				{{ item.label }}
			</a>
		</li>
	{% endfor %}
</ul>

Variants

default
Open