UserTable

organisms

User management table — name, email, role, last active, status, actions. Inline role editing for admins only.

ARIA Role: table

Demo

NameStatusAmount
Invoice #001Paid$1,200.00
Invoice #002Pending$850.00

Props

PropTypeRequiredDefaultDescription
usersUser[]Yes0-200 users
currentUserIdstringYesExcluded from impersonation

TypeScript Interface

interface UserTableProps {
  users: User[];
  currentUserId: string;
  onUserUpdate: (userId: string, updates: Partial<User>) => Promise<void>;
  onUserImpersonate?: (userId: string) => Promise<void>;
  onUserInvite: (email: string, role: UserRole) => Promise<void>;
}

Assertions (NASA Rule 5)

  • [type]users bounded 0-200 (NASA Rule 2)(NASA Rule 2)
  • [aria]Impersonate uses confirmation dialog with role='alertdialog'(WCAG 3.3.4)

Usage

Import

import { Usertable } from '@epasslive/design-system'

Basic

<Usertable />

With Variants

<Usertable variant="primary" size="md" />