{# 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 %}

{{ __('Page kit') }}

{% call section('Profile header', 'ui.profile_header(name, subtitle, avatar_url, cover_url, tabs)') %} {{ ui.profile_header('Riya Kapoor', 'Store manager · Mumbai', tabs=[{'label': 'Overview', 'url': '#', 'active': true}, {'label': 'Orders', 'url': '#'}, {'label': 'Settings', 'url': '#'}]) }} {% endcall %} {% call section('Stat strip', 'ui.stat_strip(items) · StatStripWidget') %} {{ ui.stat_strip([{'label': 'Earnings', 'value': '₹23,980', 'trend': '12%'}, {'label': 'Customers', 'value': '2,400'}, {'label': 'Avg. value', 'value': '₹480', 'trend': '3%', 'direction': 'down'}, {'label': 'Refund rate', 'value': '4%'}]) }} {% endcall %}
{% call section('Payment cards', "ui.payment_card(last4, holder, expires, brand) · ui.stat_tile(label, value, ...)") %}
{{ ui.payment_card('7852', 'Jack Peterson', '11/27', 'VISA') }}
{{ ui.stat_tile('Salary', '+₹2,000', 'Belong interactive', 'landmark') }} {{ ui.stat_tile('PayPal', '₹455.00', 'Freelance payment', 'wallet') }}
{% endcall %}
{% call section('Payment methods', 'ui.payment_method(last4, brand, edit_url)') %}
{{ ui.payment_method('7852', 'Mastercard', '#', true) }} {{ ui.payment_method('5248', 'Visa', '#') }} {{ ui.button('Add new card', 'gray', 'plus', outlined=true) }}
{% endcall %}
{% call section('Transactions', "ui.transaction_row(title, time, amount, 'in' | 'out' | 'pending') · TransactionsWidget") %}
{{ ui.transaction_row('Netflix', '27 Mar, 12:30 PM', '₹2,500', 'out') }} {{ ui.transaction_row('Apple', '27 Mar, 04:30 AM', '₹2,000', 'in') }} {{ ui.transaction_row('Stripe', '26 Mar, 01:45 PM', '₹750', 'in') }} {{ ui.transaction_row('Webflow', '26 Mar, 05:00 AM', none, 'pending') }}
{% endcall %} {% call section('Order summary', 'ui.description_list(items, total)') %}
{{ ui.description_list([('Product price', '₹900'), ('Delivery', '₹140'), ('Taxes', '₹19.50')], '₹1,059.50') }}
{% endcall %} {% call section('Copy field & rating', 'ui.copy_field(value, label, hint) · ui.rating(value, count=n)') %}
{{ ui.copy_field('tungsten-ref-4f2a91', 'Referral code', 'Share it with a friend. Each code works once.', 'g-copy') }}
{{ ui.rating(4.5, count=128) }}{{ ui.rating(3) }}
{% endcall %}
{% call section('Order tracking', 'ui.progress_steps(items, current)') %}
{{ ui.progress_steps([{'label': 'Order received', 'time': '22 Dec, 07:20 AM'}, {'label': 'Order packed', 'time': '22 Dec, 07:21 AM'}, {'label': 'With courier', 'time': '22 Dec, 08:10 AM'}, {'label': 'Delivered'}], 2) }}
{% endcall %} {% call section('Toggle tiles & readings', "ui.toggle_tile(name, label, icon, checked) · ui.metric(value, unit, label)") %}
{{ ui.toggle_tile('g_t1', 'Humidity', 'droplets', false, 'Off for 3 days') }} {{ ui.toggle_tile('g_t2', 'Temperature', 'thermometer', true, 'Active') }} {{ ui.toggle_tile('g_t3', 'Wi-Fi', 'wifi', true, 'Active') }} {{ ui.toggle_tile('g_t4', 'Lights', 'lightbulb', false, 'Off for 27 min') }} {{ ui.metric('21', '°C', 'Living room', 'Temperature') }} {{ ui.metric('87', 'm³', 'Water', 'This month') }}
{% endcall %} {% call section('Media & project cards', 'ui.media_card(title, text, image_url, eyebrow, meta, value, href, people, button_label)') %}
{{ ui.media_card('Sea-view apartment', 'Two rooms, a balcony and a short walk to the beach.', eyebrow='Stay', meta='Goa, India', value='₹4,900 / night') }} {{ ui.media_card('Mountain cabin', 'Quiet wooden cabin with a fireplace and a big kitchen.', eyebrow='Stay', meta='Manali, India', value='₹3,200 / night') }} {{ ui.media_card('Shop redesign', 'New product pages, faster checkout and a cleaner cart.', eyebrow='Project #2', href='#', people=people, button_label='View project') }} {{ ui.media_card('Mobile app', 'Order tracking and push alerts for every customer.', eyebrow='Project #3', href='#', people=people[2:], button_label='View project') }}
{% endcall %} {% call section('How it works', 'ui.steps(items)') %}
{{ ui.steps([{'title': 'Share your link', 'text': 'Send your referral code to a friend.', 'value': '₹100', 'icon': 'share-2'}, {'title': 'Friend orders', 'text': 'They get 10% off their first order.', 'value': '10%', 'icon': 'shopping-bag'}, {'title': 'You get paid', 'text': 'Earn on every order they make.', 'value': '₹500', 'icon': 'wallet'}]) }}
{% endcall %} {% call section('Pricing', 'ui.pricing_card(name, price, period, description, features, button_label, href, highlighted)') %}
{{ ui.segmented('g_billing', {'month': 'Monthly', 'year': 'Yearly'}, 'month') }}
{{ ui.pricing_card('Starter', '₹0', 'month', 'For trying things out.', ['1 admin user', '3 resources', {'text': 'Email support', 'included': false}], 'Start free') }} {{ ui.pricing_card('Business', '₹1,499', 'month', 'For growing shops.', ['10 admin users', 'Unlimited resources', 'Email support', 'Backups every day'], 'Choose Business', highlighted=true, eyebrow='Popular') }} {{ ui.pricing_card('Enterprise', '₹4,999', 'month', 'For big teams.', ['Unlimited users', 'Unlimited resources', 'Phone support', 'Own server'], 'Contact us') }}
{% endcall %}
{% call section('Chat', 'ui.chat_bubble(text, time, mine, name)') %}
{{ ui.chat_bubble('Hi! Is order ORD-031 shipped yet?', '10:42', false, 'Sophia Brown') }} {{ ui.chat_bubble('Yes, it left today. You will get the tracking link by email.', '10:44', true) }} {{ ui.chat_bubble('Great, thank you!', '10:45', false, 'Sophia Brown') }}
{% endcall %}
{% call section('Invoice', 'ui.invoice(number, issued, due, seller, buyer, items, totals, total, note)') %} {% call ui.invoice('#0453119', '06 Mar 2026', '11 Mar 2026', ['12 MG Road', 'Bengaluru 560001', '+91 80 1234 5678'], ['Nikhil Verma', '4006 Park Street', 'Kolkata 700016'], [{'name': 'Premium support', 'qty': 1, 'rate': '₹900', 'amount': '₹900'}, {'name': 'Theme licence', 'qty': 3, 'rate': '₹1,000', 'amount': '₹3,000'}, {'name': 'Setup service', 'qty': 1, 'rate': '₹890', 'amount': '₹890'}], [('Subtotal', '₹4,790'), ('GST 18%', '₹862.20')], '₹5,652.20', 'Thank you! Questions? Write to billing@example.com.', 'Acme Store') %} {{ ui.button('Print', 'gray', 'printer', outlined=true, attrs_='onclick="window.print()"') }} {% endcall %} {% endcall %}