Table

Table component for displaying and organizing tabular data.

IDNameEmailStatus
1Alice Johnsonalice@example.comActive
2Bob Smithbob@example.comInactive
3Carol Whitecarol@example.comActive
import { Table } from "@/components/table";
 
interface User {
  id: number;
  name: string;
  email: string;
  status: string;
}
 
const data: User[] = [
  { id: 1, name: "Alice Johnson", email: "alice@example.com", status: "Active" },
  { id: 2, name: "Bob Smith", email: "bob@example.com", status: "Inactive" },
];
 
export function Example() {
  return (
    <Table
      data={data}
      columns={[
        { key: "id", label: "ID" },
        { key: "name", label: "Name" },
        { key: "email", label: "Email" },
        { key: "status", label: "Status" },
      ]}
    />
  );
}

Basic Table

A simple data table displaying structured information with columns and rows. Use this for displaying tabular data in your application.

IDNameEmailStatus
1Alice Johnsonalice@example.comActive
2Bob Smithbob@example.comInactive
3Carol Whitecarol@example.comActive
import React from 'react';
import { Table } from 'ui-lab-components';
 
export default function Example() {
  const data = [
    { id: 1, name: 'Alice Johnson', email: 'alice@example.com', status: 'Active' },
    { id: 2, name: 'Bob Smith', email: 'bob@example.com', status: 'Inactive' },
    { id: 3, name: 'Carol White', email: 'carol@example.com', status: 'Active' }
  ];
 
  return (
    <Table
      data={data}
      columns={[
        { key: 'id', label: 'ID' },
        { key: 'name', label: 'Name' },
        { key: 'email', label: 'Email' },
        { key: 'status', label: 'Status' }
      ]}
    />
  );
}
UI Lab