<span class="label">Das ist ein Label<span aria-hidden="true" class="label__required" title="Notwendig">*</span></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",
  "required": true
}
  • Content:
    :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;
    }
    
  • URL: /components/raw/label/label.scss
  • Filesystem Path: src/components/1-atoms/label/label.scss
  • Size: 523 Bytes

No notes defined.