Skip to content

Responsive Table with Actions

Responsive Bootstrap 5 invoice table with status badges, a status filter and row action dropdowns to mark as paid, remind or delete.

Also known as: invoice table, admin data table, table with row actions, responsive data table

Bootstrap 5 Tables Responsive #admin #badge #dropdown #responsive #table

Responsive Table with Actions live demo

Open in new tab

Bootstrap 5 code (HTML, CSS, JS)

A responsive Bootstrap 5 data table for invoices with colored status badges, a status filter and a three-dot action dropdown on every row. Use it in admin panels, billing pages, CRM screens and any dashboard that lists records people need to act on.

How it works

The root is section.ta-wrap, which holds a white .ta-card. The .ta-toolbar at the top shows the title, a live row count in .ta-count, the .ta-filter status select and a "New invoice" button. The table is a standard Bootstrap table table-hover align-middle with the .ta-table class, wrapped in table-responsive so it scrolls horizontally on small screens instead of breaking the layout. The Issued column uses d-none d-md-table-cell to hide on phones.

Every body row has a data-ta-status attribute (paid, pending, overdue or draft). The status cell shows a pill .ta-badge with a modifier such as .ta-badge--overdue and a small dot drawn with ::before. The last cell holds a Bootstrap dropdown. Because table-responsive sets overflow, each toggle has data-bs-popper-config='{"strategy":"fixed"}', so the menu is positioned relative to the viewport and is never clipped by the table.

The script runs on DOMContentLoaded for every .ta-wrap. The filter's change event hides rows whose status does not match, updates the count and shows the .ta-empty row when nothing matches. A delegated click listener on tbody handles menu items with data-ta-action: paid swaps the badge and disables that item, remind posts a confirmation in .ta-status, and delete fades the row out, removes it and moves focus to the next row's menu button.

Customization

  • --ta-accent in .ta-wrap: recolors the "New invoice" button, active dropdown items, focus outlines and status messages.
  • .ta-badge--paid, .ta-badge--pending, .ta-badge--overdue, .ta-badge--draft in style.css: change badge colors or add a new status by creating another modifier and adding it to badgeText in script.js.
  • min-width: 40rem in .ta-table: lower it to let the table squeeze further before horizontal scrolling starts.
  • d-none d-md-table-cell on the Issued column: apply it to other columns to hide them on phones.
  • The remind branch in script.js: replace the announcement with fetch() to your billing or email API.
  • .ta-avatar--1 to .ta-avatar--6: set client avatar colors or swap the initials for placehold.co images.

Use cases

  • Admin panels: an invoice table with colored status badges lists billing records clearly
  • Billing pages: a status filter narrows the list while a live row count updates above
  • CRM screens: a three-dot dropdown on each row offers actions like mark as paid, remind or delete
  • Mobile dashboards: the responsive table stays usable on small screens

Accessibility

The table has a visually hidden caption, header cells use scope="col" and the empty actions header has hidden text. Each menu toggle has an aria-label that names its invoice, and Bootstrap manages aria-expanded and arrow-key navigation inside the menu. "Mark as paid" gets aria-disabled once an invoice is paid, so it is skipped by the keyboard. The filter select has a hidden label and aria-controls. Results are announced through the role="status" region, focus is moved to a sensible control after every action, and the row fade-out is skipped under prefers-reduced-motion.

Usage notes

Requires Bootstrap 5 with its JavaScript bundle (both loaded automatically) and Bootstrap Icons. Change the ta-filter and ta-table ids when you use more than one table per page.

Responsive Table with Actions at a glance

Framework
Bootstrap 5
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Bootstrap 5, Bootstrap Icons
Layout
Responsive, works on mobile
Category
Tables
License
Free for personal and commercial use

Questions about this template

Can I use the Responsive Table with Actions code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Bootstrap 5 and Bootstrap Icons from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  • <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
  • <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
Responsive Table with Actions – free Bootstrap 5 table template
Responsive Table with Actions · free Bootstrap 5 table template

More Tables

Table with Search Filter – free Bootstrap 5 table template

Table with Search Filter

Bootstrap 5 team directory table with live search, status filter, highlighted matches, result counter and empty state.

Sortable Data Table – free Tailwind CSS table template

Sortable Data Table

Tailwind CSS data table with clickable column headers that sort text, dates and numbers, with aria-sort, arrow indicators and a responsive scroll wrapper.

Editable Table with Inline Editing – free Bootstrap 5 table template

Editable Table with Inline Editing

Dark Bootstrap 5 inventory table with click-to-edit cells, validation, live totals, an unsaved changes counter and simulated save and discard.

Product Comparison Table Section for Shopify – free Shopify table template

Product Comparison Table Section for Shopify

Shopify section with a real comparison table for 2 to 4 products: live prices, yes/no icons, row values set in the theme editor, and a sticky first column when it scrolls on phones.

Table with Sticky Header – free Pure CSS table template

Table with Sticky Header

Dark striped data table in pure CSS with a sticky header row and sticky first column inside a scrollable, keyboard-focusable container.