{#- 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_map=none, disabled=false) %} {% 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 "") %} {% if href %} {% if icon %}{{ icon | icon }}{% end %} {{ text }} {% else %} {% end %} {% end %}