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:
suspendtoggles the row between Active and Suspended, switches the menu label and dims the user with.uta-is-suspended.messageandresendreport through the.uta-feedbacklive 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-accenton.uta-root: changes the selected role filter, the online counter, the focus ring and the feedback text.--uta-bg,--uta-paneland--uta-lineon.uta-root: set the page, panel and divider colors..uta-role--owner,--admin,--editorand--viewerinstyle.css: recolor the role badges or add new roles.data-uta-roleon each<tr>: must match avaluein the.uta-rolesradio group for the filter to work.- Swap
status-onlineforstatus-away,status-busyorstatus-offlineon.avatar-statusto change presence. - Replace the comment in the
suspendbranch ofscript.jswith afetch()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.