{# Fusion built-in UI components (Tera 2). Use: {{}} Docs: include styles via {% include "fusion/components.css" %} or extend fusion/base.html #} {% component fusion.button(label: string, href: string = "", variant: string = "primary", type: string = "button") %} {%- if href -%} {{ label }} {%- else -%} {%- endif -%} {% endcomponent fusion.button %} {% component fusion.link(label: string, href: string = "#", variant: string = "default") %} {{ label }} {% endcomponent fusion.link %} {% component fusion.card(title: string = "", content: string = "") %}
{% if title %}
{{ title }}
{% endif %}
{% if content %}{{ content | safe }}{% else %}{{ body | safe }}{% endif %}
{% endcomponent fusion.card %} {% component fusion.alert(message: string, variant: string = "info") %} {% endcomponent fusion.alert %} {# Status/pill badge. Set dot={true} for the success-style indicator used on the welcome page. #} {% component fusion.badge(label: string, variant: string = "default", dot: bool = false) %} {%- if dot -%}{%- endif -%} {{ label }} {% endcomponent fusion.badge %} {# Data table. Pass headers/rows as arrays, and/or nest custom markup as the body. Set page_size={10} to paginate the rows array client-side (0 = off). #} {% component fusion.table(headers: array = [], rows: array = [], caption: string = "", page_size: number = 0) %}
0 %} data-page-size="{{ page_size }}"{% endif %}> {% if caption %}{% endif %} {% if headers %} {% for h in headers %}{% endfor %} {% endif %} {% for row in rows %} 0 %} data-fusion-row{% endif %}> {% for cell in row %}{% endfor %} {% endfor %} {{ body | safe }}
{{ caption }}
{{ h }}
{{ cell }}
{% if page_size > 0 %} {% endif %}
{% if page_size > 0 %} {% endif %} {% endcomponent fusion.table %}