{# The UI kit gallery: every modern component with sample data. Use it as a custom page: content_template = "tungsten/components/gallery.html" #} {% import "tungsten/components/ui.html" as ui %} {% set people = [{'name': 'Sophia Brown', 'avatar': none}, {'name': 'Alex Johnson', 'avatar': none}, {'name': 'Riya Kapoor', 'avatar': none}, {'name': 'Dev Patel', 'avatar': none}, {'name': 'Mia Chen', 'avatar': none}, {'name': 'Omar Ali', 'avatar': none}] %} {% macro section(title, note) %}

{{ __(title) }}

{{ caller() }}
{% endmacro %}
{% call section('Stat cards', "ui.stat_card(..., variant='brand' | 'dark')") %}
{{ ui.stat_card('Total earnings', '₹3,48,000', 'wallet', 'primary', 'This month', '12%', 'up', none, [4, 6, 5, 8, 7, 9], none, 'g-s1', 'brand') }} {{ ui.stat_card('Total spending', '₹1,13,500', 'credit-card', 'info', 'This month', '5%', 'down', none, [9, 7, 8, 6, 7, 5], none, 'g-s2') }} {{ ui.stat_card('New customers', '1,368', 'users', 'success', 'Since last week', '8%', 'up', none, [3, 4, 4, 6, 7, 8], none, 'g-s3') }} {{ ui.stat_card('Q4 revenue', '₹5,626', 'target', 'primary', 'Target ₹20,000', '28%', 'up', none, none, none, 'g-s4', 'dark') }}
{% endcall %}
{% call section('Navigation pills', 'ui.pill_tabs(items) · ui.segmented(name, options, value)') %}
{{ ui.pill_tabs([{'label': 'Overview', 'url': '#', 'active': true}, {'label': 'Activity', 'url': '#'}, {'label': 'Manage', 'url': '#'}, {'label': 'Reports', 'url': '#', 'badge': 4}]) }} {{ ui.pill_tabs([{'label': 'Day', 'url': '#'}, {'label': 'Week', 'url': '#', 'active': true}, {'label': 'Month', 'url': '#'}], muted=true) }} {{ ui.segmented('g_period', {'7': '7 days', '30': '30 days', '90': '90 days'}, '30') }}
{% endcall %}
{% call section('Chips & badges', 'ui.chip · ui.badge · ui.trend_pill · ui.kbd') %}
{{ ui.chip('June 2025', 'calendar') }}{{ ui.chip('USD', dot_color='success') }}{{ ui.chip('All time', 'clock') }} {{ ui.badge('Paid', 'success') }}{{ ui.badge('Pending', 'warning') }}{{ ui.badge('Cancelled', 'danger') }} {{ ui.trend_pill('12%', 'up') }}{{ ui.trend_pill('4%', 'down') }}{{ ui.kbd('⌘K') }}
{% endcall %}
{% call section('Progress ring', 'ui.progress_ring(percent, color, size)') %}
{{ ui.progress_ring(42, 'primary', 104, 11, 'Websites') }} {{ ui.progress_ring(76, 'success', 104, 11, 'Done') }}
{% endcall %} {% call section('Gauge', 'ui.gauge(percent, color, value, caption)') %}
{{ ui.gauge(28, 'primary', '₹5,626', 'of ₹20,000', 'Target', true) }}
{% endcall %} {% call section('Meters', 'ui.meter(label, percent, color)') %}
{{ ui.meter('Enterprise deals', 12, 'danger') }} {{ ui.meter('Upsell revenue', 56, 'success') }} {{ ui.meter('Renewals', 81, 'info') }}
{% endcall %}
{% call section('Columns', 'ui.columns(cols, color, height)') %}
{{ ui.columns([{'label': 'Jan', 'display': '120', 'height': 55}, {'label': 'Feb', 'display': '90', 'height': 40}, {'label': 'Mar', 'display': '₹1,300', 'height': 90, 'active': true}, {'label': 'Apr', 'display': '60', 'height': 28}, {'label': 'May', 'display': '140', 'height': 62}, {'label': 'Jun', 'display': '100', 'height': 46}], 'info', '13rem') }}
{% endcall %} {% call section('Banner', "ui.banner(heading, text, button_label, url, eyebrow, variant='soft' | 'brand' | 'dark')") %}
{{ ui.banner("Work's better together", 'Add teammates and work as one.', 'Add member', '#', 'Team', 'soft', 'purple') }} {{ ui.banner('Get premium', 'Unlock every report.', 'Join pro', '#', '14 day trial', 'dark') }}
{% endcall %}
{% call section('Timeline', 'ui.timeline_item(title, description, time, icon, color)') %}
    {{ ui.timeline_item('Order ORD-031 paid', 'Nikhil Verma · ₹7,196', '2h ago', 'badge-check', 'success') }} {{ ui.timeline_item('New customer', 'Riya Kapoor signed up', '5h ago', 'user-plus', 'info') }} {{ ui.timeline_item('Product updated', 'Smart Watch price changed', 'Yesterday', 'pencil', 'purple', true) }}
{% endcall %} {% call section('List rows', 'ui.list_row(title, description, value, ...)') %}
{{ ui.list_row('Hannah Lee', 'Sales lead', '₹82,410', avatar_name='Hannah Lee') }} {{ ui.list_row('Marcus Webb', 'Account exec', '₹61,200', avatar_name='Marcus Webb') }} {{ ui.list_row('Website', 'Lead source', none, 'globe', 'info', badge_text='42%', badge_color='info') }} {{ ui.list_row('Referral', 'Lead source', none, 'share-2', 'pink', badge_text='18%', badge_color='pink') }}
{% endcall %} {% call section('People & week', 'ui.avatar_group(people) · ui.week_strip(days)') %}
{{ ui.avatar_group(people) }}{{ __('6 members') }}
{{ ui.week_strip([{'name': 'Mon', 'day': 15}, {'name': 'Tue', 'day': 16}, {'name': 'Wed', 'day': 17, 'today': true}, {'name': 'Thu', 'day': 18}, {'name': 'Fri', 'day': 19}, {'name': 'Sat', 'day': 20}, {'name': 'Sun', 'day': 21}]) }}
{% endcall %}
{% call section('Alerts', "ui.alert(heading, text, color)") %}
{{ ui.alert('Backup finished', 'All 12 tables were saved.', 'success') }} {{ ui.alert('Stock is low', '3 products have less than 5 left.', 'warning') }}
{% endcall %} {% call section('Switches & KPIs', 'ui.switch(name, checked, label) · ui.kpi(label, value)') %}
{{ ui.switch('g_online', true, 'Online payments', 'Allow card payments') }} {{ ui.switch('g_abroad', false, 'Use abroad', 'Payments outside India') }}
{{ ui.kpi('New business', '₹2,263', accent='info') }}{{ ui.kpi('Renewals', '₹1,244', '9%', accent='warning') }}
{% endcall %} {% call section('Surfaces', '.tw-card · .tw-well · .tw-glass · .tw-skeleton') %}
{{ __('A well: a soft block inside a card.') }}
{{ __('Glass: a frosted panel.') }}
{{ ui.skeleton(3) }} {{ ui.divider('or') }}
{{ ui.button('Primary') }}{{ ui.button('Gray', 'gray') }}{{ __('Dark') }}
{% endcall %}