{#- chirp-ui: Shimmer Button Button with animated shimmer overlay effect. Usage: from "chirpui/shimmer_button.html" import shimmer_button shimmer_button("Get Started") shimmer_button("Subscribe", variant="primary", size="lg") shimmer_button("Learn More", href="/docs", icon="→") -#} {% def shimmer_button(text, variant="", size="", icon=none, href=none, cls="", type="button", attrs="", attrs_unsafe="", attrs_map=none, disabled=false) %} {% set _attrs_raw = attrs_unsafe or (attrs | deprecate_param("attrs", "attrs_unsafe or attrs_map")) %} {% set variant = variant | validate_variant(("", "default", "primary"), "") %} {% set size = size | validate_variant(("", "sm", "md", "lg"), "") %} {% set variant_class = " chirpui-shimmer-btn--" ~ variant if variant else "" %} {% set size_class = " chirpui-shimmer-btn--" ~ size if size else "" %} {% set base = "chirpui-shimmer-btn" ~ variant_class ~ size_class ~ (" " ~ cls if cls else "") %} {% set _route_attrs = route_link_attrs(href, disabled=disabled, attrs=_attrs_raw, attrs_map=attrs_map) if href else {} %} {% if href %} {% if icon %}{{ icon | icon }}{% end %} {{ text }} {% else %} {% end %} {% end %}