larva objects: o-indicator

Available Variants

photos prototype
Label Text
o-indicator README

The indicator object supports c-span and/or c-icon. It is useful for arbitrary icons or text that visually support other elements, for example, the "Photos" or "Video" indication stuck to the image in a story excerpt. Works nicely with a-glue.

o-indicator Twig The markup file.
<span class="o-indicator {{ o_indicator_classes }}">
	{% if c_icon %}
		{% include "@larva/components/c-icon/c-icon.twig" with c_icon %}
	{% endif %}

	{% if c_span %}
		{% include "@larva/components/c-span/c-span.twig" with c_span %}
	{% endif %}
</span>
o-indicator JSON The data object for this pattern.
{
	"o_indicator_classes": "lrv-a-glue lrv-a-glue--b-0 lrv-a-glue--r-0 u-pointer-events-none",
	"c_span": {
		"modifier_class": "",
		"c_span_classes": "lrv-u-whitespace-nowrap",
		"c_span_text": "Label Text",
		"c_span_url": "",
		"c_span_link_classes": ""
	}
}