form-element-label
Information
- Folder
src/components/fsk/form/form-element/form-element-label
Files
Schema
$schema: http://json-schema.org/draft-07/schema#
$id: /fsk/form/form-element/form-element-label
additionalProperties: false
properties:
attributes:
type: object
required:
type: boolean
title:
type: string
title_display:
type: string
enum:
- invisible
required:
- attributes
- title
Mocks
title: Input label
attributes:
$drupal: true
for: foo
$variants:
- $name: Required
required: true
Template
<label{{ attributes ? attributes|without("class", "for") : "" }} for="{{ attributes.for }}" class="FskFormElementLabel{{ title_display == 'invisible' ? " u-hiddenVisually" : "" }} {{ attributes.class }}{% if required %} is-required{% endif %}">{{ title }}</label>
Variants