{#- chirp-ui: Status Indicator component Visual status with dot or icon and label. Usage: from "chirpui/status.html" import status_indicator status_indicator("Running", variant="success") status_indicator("Live", color="#78c850") -#} {% def status_indicator(label, variant="", icon=none, pulse=false, cls="", color=none) %} {# @consumes _surface_variant from: panel, surface — falls back to "" #} {% set _surface = consume("_surface_variant", "") %} {% set _on_surface = " chirpui-status-indicator--on-" ~ _surface if _surface and _surface != "default" else "" %} {% set resolved = color | resolve_color %} {% set st_variant = ("custom" if resolved else (variant | validate_variant_block("status-indicator", "default"))) %}
{% if icon %} {{ icon }} {% else %} {% end %} {{ label }}
{% end %}