larva components: c-label
Available Variants
prototypec-label README
c-label should be used for the labels for components.
| Attributes | Description |
|---|---|
| c_label_text | Text content for the label. |
| c_label_classes | CSS classes of the label. |
| c_label_tag | Which tag need to use to render label, either h2 or span where default will be span |
| c_label_id_attr | Value of id attribute label. |
| c_label_url | URL for label. (optional) |
| c_label_link_classes | CSS classes for link. |
c-label Twig The markup file.
{% if c_label_tag_text %}
<{{ c_label_tag_text }} id="{{ c_label_id_attr }}" class="c-label {{ modifier_class }} {{ c_label_classes }}" {{ c_label_data_attr }}>
{% else %}
<span id="{{ c_label_id_attr }}" class="c-label {{ modifier_class }} {{ c_label_classes }}" {{ c_label_data_attr }}>
{% endif %}
{% if c_label_url %}
<a href="{{ c_label_url }}" class="c-label__link {{ c_label_link_classes }}">
{% endif %}
{{ c_label_text }}
{% if c_label_url %}
</a>
{% endif %}
{% if c_label_tag_text %}
</{{ c_label_tag_text }}>
{% else %}
</span>
{% endif %}
c-label JSON The data object for this pattern.
{
"c_label_text": "Label Here",
"c_label_tag_text": "span",
"c_label_id_attr": "",
"c_label_url": "#",
"c_label_link_classes": ""
}