Tungsten Page Kit: 17 Ready-Made Admin Page Blocks for Python and FastAPI (Invoices, Pricing, Payments, Chat)

|
Category:Software DevelopmentTags:FastAPI admin panelPython admin paneladmin UI componentsadmin dashboard templateinvoice templatepricing cardspayment card UIorder tracking UIdashboard widgetsTungstentungsten-adminopen source admin
Tungsten Page Kit: 17 Ready-Made Admin Page Blocks for Python and FastAPI (Invoices, Pricing, Payments, Chat)

Tungsten 0.1.16 adds a page kit to the free FastAPI admin panel: 17 ready-made blocks (profile, payment cards, transactions, printable invoice, pricing, order tracking, device tiles, chat, ratings) and 2 new widgets.

10 min read

In short: Tungsten, the free and open source admin panel for Python and FastAPI, now ships a page kit: 17 ready-made UI blocks and 2 new dashboard widgets for whole pages. You get a profile header, a stat strip, payment cards, saved card rows, transactions, an order summary, a printable invoice, pricing cards, "how it works" steps, order tracking, on/off device tiles, big readings, media and project cards, a copy field, chat bubbles and star ratings. Every block works in light mode, dark mode and on a phone. It all comes in tungsten-admin 0.1.16, which is live on PyPI.

New to Tungsten? It builds admin pages (forms, tables, dashboards, logins and roles) from plain Python classes. Start with our introduction to the Tungsten FastAPI admin panel. If you missed the last big update, read about Tungsten's new modern admin panel design first. The page kit is built on top of that design.

What is the Tungsten page kit?

The page kit is a set of bigger building blocks for full screens inside your admin panel. Tungsten already had small parts like badges, chips, meters and pill tabs. Those are great for decorating a card. But real business apps also need whole pages: a billing page, a customer profile, an order page, a pricing page, a support chat. Building those from scratch takes days of HTML and CSS work.

The page kit gives you those screens as Jinja macros. You call a macro with your data, and Tungsten draws the block in the same clean style as the rest of the panel. No extra CSS, no JavaScript library, no design work.

We studied many popular dashboard templates page by page to see which blocks people use most. Then we wrote Tungsten's own versions in its flat, crisp style. The code and the styles are Tungsten's own and are free to use under the MIT license.

Which components are in the page kit?

Here is the full list of the 17 new macros in tungsten/components/ui.html, grouped by the kind of page they help with.

Profile and numbers

  • ui.profile_header: the top of a profile page. A cover band (plain grey if you give no picture), a big avatar, the name, a subtitle and pill tabs like "Overview, Orders, Settings".
  • ui.stat_strip: a row of numbers in one card, split by thin lines. Each number can have a trend pill (up in green, down in red). On a phone it shows two per row.
  • ui.stat_tile: a centred tile with an icon, a label, a muted line and the value under a rule, for example "Salary +₹2,000".
  • ui.metric: a big reading with its unit, like "21 °C, Living room" or "87 m³ of water this month".

Billing and payments

  • ui.payment_card: a bank card drawn flat, in black or white. Only the last four digits are shown, so it is safe to put on screen.
  • ui.payment_method: a saved card row with the brand, the last four digits, a "Default" badge and an edit button.
  • ui.transaction_row: one payment. Money in shows a green plus, money out a red minus, and pending payments are grey.
  • ui.description_list: label and value rows, like an order summary or billing details, with an optional bold total row.
  • ui.invoice: a full invoice with seller, buyer, invoice number, dates, line items, tax rows (for example GST 18%) and the total. It is made for printing, so a Print button gives a clean paper copy.

Sales and marketing pages

  • ui.pricing_card: one plan with a price, period, short text and a list of features. Features can be ticked or crossed out. highlighted=true draws the dark "popular" card. Pair it with the existing ui.segmented switch for Monthly / Yearly.
  • ui.steps: numbered "how it works" blocks, great for a referral program ("Share your link, friend orders, you get paid").
  • ui.media_card: a card with an optional picture for places, products or projects. It can show a price, a location and a group of team avatars.
  • ui.copy_field: a read-only value with a Copy button, for referral codes, API links or invite links.
  • ui.rating: stars with half stars, the score and an optional review count, like "4.5 (128)".

Orders, devices and chat

  • ui.progress_steps: order tracking across the card: "Order received, Order packed, With courier, Delivered". Steps before the current one get a tick. On a phone it runs down the card.
  • ui.toggle_tile: an on/off tile for a device or a feature (lights, Wi-Fi, temperature). It is a real checkbox that turns dark while on, and it needs no JavaScript.
  • ui.chat_bubble: one chat message with time, name and avatar. Your own messages sit on the right in a dark bubble.

What are the two new dashboard widgets?

Two of the blocks are also dashboard widgets, so you can add them to the dashboard with a few lines of Python and no template at all.

StatStripWidget shows several numbers in one card. A badge becomes a trend pill, and color="danger" points it down:

from tungsten import Item, StatStripWidget

class ReferralNumbers(StatStripWidget):
    @classmethod
    def items(cls, db):
        return [Item("Earnings", "₹23,980", badge="12%"),
                Item("Customers", "2,400"),
                Item("Avg. value", "₹480", badge="3%", color="danger"),
                Item("Refund rate", "4%")]

TransactionsWidget lists money in and out. The color sets the direction (success for in, danger for out, gray for pending), and a description starts a new group such as "Newest" or "Yesterday":

from tungsten import Item, TransactionsWidget

class LatestPayments(TransactionsWidget):
    heading = "Your transactions"
    icon = "receipt"

    @classmethod
    def items(cls, db):
        return [Item("Netflix", "₹2,500", time="27 Mar, 12:30", color="danger", description="Newest"),
                Item("Apple", "₹2,000", time="27 Mar, 04:30", color="success"),
                Item("Webflow", time="26 Mar", color="gray", description="Yesterday")]

Both widgets follow the same rules as Tungsten's other widgets, so column_span and sort work as usual. Want users to build their own dashboards from widgets like these? See the Tungsten custom dashboards plugin.

How do I use a page kit block on my own page?

The blocks are meant for custom pages. Make a page with a template, import the UI kit, and call the macros with your data. Here is a small billing page:

# admin.py
from tungsten import Page

class Billing(Page):
    title = "Billing"
    content_template = "admin/billing.html"
{# templates/admin/billing.html #}
{% import "tungsten/components/ui.html" as ui %}

{{ ui.stat_strip([
  {'label': 'Earnings', 'value': '₹23,980', 'trend': '12%', 'direction': 'up'},
  {'label': 'Customers', 'value': '2,400'},
]) }}

{{ ui.payment_card('7852', 'Jack Peterson', '11/27', 'Visa') }}
{{ ui.transaction_row('Netflix', '27 Mar, 12:30 PM', '₹2,500', 'out') }}
{{ ui.description_list([('Product price', '₹900'), ('Delivery', '₹140')], total='₹1,040') }}

Add your template folder with Panel(template_dirs=[...]) and the page shows up in the sidebar like any other page. For the invoice, use {% call ui.invoice(...) %} and put a Print button inside the call, so it sits in the invoice footer.

The colors follow Panel(colors=...), so a blue or green brand gets the same blocks in its own color. If you want to change more, read the custom theme guide.

Where can I see every component live?

Every block is on the UI kit page of the demo app, in a new "Page kit" part. Run the Tungsten demo app and open Settings → UI kit. Each block shows its macro name and arguments right next to it, so you can copy the call straight into your own template. You can also add the same gallery to your own panel:

class UiKit(Page):
    title = "UI kit"
    content_template = "tungsten/components/gallery.html"

The full table of macros and arguments is in the UI components docs.

Does the page kit work in dark mode and on phones?

Yes. Every block was checked in light mode, dark mode and on a phone-sized screen. A few examples of how they adapt:

  • The stat strip drops from four numbers per row to two on a phone.
  • Order tracking turns from a line across the card into a list down the card.
  • Toggle tiles flip: dark tiles when "on" in light mode, white tiles when "on" in dark mode.
  • Pricing cards, media cards and the invoice stack into one column.
  • The invoice drops its card shadow when printed, so the paper copy looks clean.

Why build these blocks into the admin panel?

Most admin panels stop at forms and tables. That is fine for data entry, but business apps need more. An online shop wants an order page with tracking. A SaaS app needs a billing page with cards, invoices and plans. A smart-home or IoT app needs device switches and live readings. A support team needs a chat view.

With the page kit, these screens take minutes instead of days. You write Python for the data and one line per block in the template. The result looks like one product, because the blocks share the same cards, spacing, fonts and colors as the rest of Tungsten. There are no extra front-end tools to install, and the stylesheet is already built into the package.

The blocks also fit nicely with Tungsten's plugins. For example, combine transactions and invoices with the Finance plugin, use chat bubbles next to a help desk, or move orders through stages on a kanban board.

How do I upgrade to tungsten-admin 0.1.16?

Upgrade with pip:

pip install -U tungsten-admin

That is all. The page kit is part of the core package, so there is no new plugin to install and no setting to turn on. Your existing pages, resources and widgets keep working as before. New to Tungsten? Follow the installation guide. The full list of changes is on the Tungsten changelog, and the source code is on GitHub.

Frequently asked questions

What is the Tungsten page kit?

It is a set of 17 ready-made UI blocks and 2 dashboard widgets for whole admin pages: profile, billing, invoices, pricing, order tracking, device tiles, chat and more. It ships in tungsten-admin 0.1.16.

Is the page kit free?

Yes. Tungsten is free and open source under the MIT license, and the page kit is part of the core package.

Do I need JavaScript or extra CSS?

No. The blocks are Jinja macros styled by the panel's own stylesheet. Even the on/off toggle tile is a plain checkbox.

Can I print the invoice?

Yes. ui.invoice is made for printing. Add a Print button inside the invoice call and the browser prints a clean copy without the card shadow.

Does the payment card show the full card number?

No. ui.payment_card only takes and shows the last four digits.

Will upgrading break my panel?

No. The page kit only adds new macros and widgets. Run pip install -U tungsten-admin and your current pages keep working.

Need a custom admin panel, billing screen or business software built on Tungsten? Talk to Prism Infoways. We build fast, modern admin panels for startups and businesses in India and worldwide.

Need Expert IT Solutions?

Ready to transform your business? Team up with Prism Infoways and harness cutting-edge technology for your growth.

Contact Us

Related Blogs