Componentdata1.12 KB gzipZero dependencies
User Table
User management table with role badges, status dots and remove action.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add user-tableOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { UserTable } from "@/components/ui/user-table"; <UserTable />Source code
user-table.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxuser-table.tsx104 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export type UserStatus = "active" | "invited" | "suspended"; export interface UserRow { id: string; name: string; initials: string; email: string; role: "admin" | "editor" | "member" | "viewer"; status: UserStatus;} export interface UserTableProps extends React.HTMLAttributes<HTMLDivElement> { users: UserRow[];Props
| Prop | Type | Description |
|---|---|---|
| users | UserRow[] | Configures users. (Default: []) |
| onRemove | (id: string) => void | Callback invoked on remove. |