card

Information

Folder
src/components/patterns/card

Files

Schema
Mocks
Template
// src/components/patterns/card/card.twig

{{ attach_library("circle_dot/pattern-card") }}

{% set additional_attributes_string %}
{% for attribute in additional_attributes %}
	{{ attribute[0] }}="{{ attribute[1] }}"
{% endfor %}
{% endset %}

<beck-card class="Card {{ classes|join(' ') }}" {{ additional_attributes_string }} {% if is_hidden %}hidden{% endif %}>
	{% if dismissible %}
		{% include "@elements/button/button.twig" with {
				classes: ["Card-closeButton", "js-Card-closeButton"],
				icon: "close",
				icon_only: true,
				label: "Schließen",
				modifiers: ["quaternary"],
				size: "small",
			} only %}
	{% endif %}

	{% if title %}
		<h4 class="Card-title">{{ title }}</h4>
	{% endif %}

	<p class="Card-content">{{ content }}</p>

	{% if actions %}
		<div class="Card-actions">
			{% for action in actions %}
				{{ action }}
			{% endfor %}
		</div>
	{% endif %}
</beck-card>

Error: schema is invalid: data/properties must be object

Variants

Card with actions
Open

Card with actions mock data

Raw
Resolved
Card without dismissible
Open

Card without dismissible mock data

Raw
Resolved
Card without title
Open

Card without title mock data

Raw
Resolved
Card without actions
Open

Card without actions mock data

Raw
Resolved
Minimal card
Open

Minimal card mock data

Raw
Resolved