Skip to content

Users Table with Avatars

Dark Bootstrap 6 team members table with photo avatars, presence dots, role badges, status, search, role filter and per-row action menus that stacks into cards on mobile.

Also known as: team members table, user list with profile photos, user list table, team directory table, member list with roles

Bootstrap 6 Tables Responsive Dark #admin #avatar #dark #responsive #table #users

Users Table with Avatars live demo

Open in new tab

Bootstrap 6 code (HTML, CSS, JS)

A dark Bootstrap 6 users table for team settings and admin dashboards. Each member has a round photo avatar with a presence dot, a colored role badge, a status indicator and a "last active" label. Search, a role filter and per-row action menus are included, and narrow screens get stacked cards.

How it works

data-bs-theme="dark" on .uta-root renders all Bootstrap 6 parts in dark mode. Avatars use the new CSS-only .avatar component: .avatar-img for the photo and .avatar-status with status-online, status-away, status-busy or status-offline for the dot. One member uses an initials avatar, .uta-initials. The header shows an .avatar-stack with the people who are online right now.

The table carries md:table-stacked inside a .table-responsive wrapper. When the wrapper is narrower than 768 px, Bootstrap hides the header and prints each cell's data-cell label. Extra rules in an @container block in style.css put the label and value on one line and pin the .uta-actions menu button to the top right of each card.

script.js filters rows on every input event of .uta-query and every change of the .uta-roles radio group, comparing against each row's data-uta-role. It updates .uta-shown and shows .uta-empty when nothing matches. Menu items with data-uta-do run the actions:

  • suspend toggles the row between Active and Suspended, switches the menu label and dims the user with .uta-is-suspended.
  • message and resend report through the .uta-feedback live region.

The online counter is recalculated from the .status-online dots of rows that are not suspended.

The avatar photos come from Unsplash. Replace them with your own users' images.

Customization

  • --uta-accent on .uta-root: changes the selected role filter, the online counter, the focus ring and the feedback text.
  • --uta-bg, --uta-panel and --uta-line on .uta-root: set the page, panel and divider colors.
  • .uta-role--owner, --admin, --editor and --viewer in style.css: recolor the role badges or add new roles.
  • data-uta-role on each <tr>: must match a value in the .uta-roles radio group for the filter to work.
  • Swap status-online for status-away, status-busy or status-offline on .avatar-status to change presence.
  • Replace the comment in the suspend branch of script.js with a fetch() call to your user API.

Use cases

  • Admin dashboards: a team table shows photo avatars, presence dots and role badges
  • Workspace settings: search and a role filter narrow down long member lists
  • HR and team directories: each member has a status and a per-row action menu
  • Mobile admin screens: the table stacks into cards on small displays

Accessibility

Presence dots have role="img" and an aria-label (Online, Away…). Photo avatars use empty alt because the name is printed next to them. Each menu button's aria-label names the user, and the Bootstrap Menu supports arrow keys and Escape. The role filter is a labelled radio group, and the result count and feedback live in aria-live="polite" regions. The row hover transition is turned off under prefers-reduced-motion.

Bootstrap 6 notes

The .avatar, .avatar-status and .avatar-stack classes are new in Bootstrap 6. Bootstrap 5 needed custom CSS for them. dropdown-menu becomes .menu with data-bs-toggle="menu", and the role filter uses the new label.btn-check pattern, with the radio inside the label. Responsive stacking comes from md:table-stacked instead of a custom media query. Built on Bootstrap 6.0.0-alpha.1, so APIs may still change.

Users Table with Avatars at a glance

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

Questions about this template

Can I use the Users Table with Avatars 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 6 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@6.0.0-alpha.1/dist/css/bootstrap.min.css">
  • <script type="module" src="https://cdn.jsdelivr.net/npm/bootstrap@6.0.0-alpha.1/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">

Built for Bootstrap 6.0.0-alpha.1. Bootstrap 6 ships as an ES module, so its script and this component's JavaScript load with type="module". Alpha releases can still change before the stable version.

Users Table with Avatars – free Bootstrap 6 table template
Users Table with Avatars · free Bootstrap 6 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.

Table with Checkbox Selection – free Bootstrap 6 table template

Table with Checkbox Selection

Bootstrap 6 orders table with row checkboxes, an indeterminate select-all box, Shift-click ranges and a bulk actions bar with export menu, delete and undo.

Striped and Hover Table Styles – free Bootstrap 6 table template

Striped and Hover Table Styles

Interactive Bootstrap 6 table style playground: toggle striped, hover, bordered, small and dark variants and copy the resulting table markup.

Table with Search and Pagination – free Bootstrap 6 table template

Table with Search and Pagination

Bootstrap 6 customer table with debounced live search and match highlighting, sortable columns with aria-sort, a rows-per-page select and smart pagination.

Responsive Table with Actions – free Bootstrap 6 table template

Responsive Table with Actions

Bootstrap 6 invoice table with status badges, per-row action Menus, a delete confirmation Dialog, Toast feedback and stacked cards on narrow screens.