<span class="label">Das ist ein Label</span>
<span {{ html_attributes({
class: 'label',
}, attrs ?? {}) }}>
{{- text -}}
{%- if required|default -%}
<span aria-hidden="true" class="label__required" title="{{ 'Required' | t('site') }}">*</span>
{%- endif -%}
</span>
{
"text": "Das ist ein Label",
"for": "id"
}
:root {
--label-color: currentColor;
--label-font-size: 1.2rem;
--label-line-height: var(--line-height-body);
--label-required-color: var(--color-orange);
--label-font-weight: var(--font-weight-bold);
}
.label {
color: var(--label-color);
display: block;
font-size: var(--label-font-size);
font-weight: var(--label-font-weight);
line-height: var(--label-line-height);
}
.label__required {
color: var(--label-required-color);
cursor: help;
display: inline-block;
margin-inline-start: 0.5rem;
}
No notes defined.