Lambda UI
v1.3.4
Stable

Table

Table component for displaying tabular data with sorting, pagination, and multiple variants.

Playground

Experiment with all the properties of the Table component in real time.

Properties
variant

Visual style of the table.

size
Medium

Size of the table.

highlightOnHover

Highlight table rows on hover.

ID
Name
Email
Role
Status
1
John Doe
john@example.com
Admin
Active
2
Jane Smith
jane@example.com
User
Active
3
Bob Johnson
bob@example.com
User
Inactive
4
Alice Williams
alice@example.com
Manager
Active
5
Charlie Brown
charlie@example.com
User
Active

Usage

Basic table with rows and columns. Use compound components for structure.

import { Table } from "lambda-ui-components";

const data = [
	{ id: 1, name: "John Doe", email: "john@example.com" },
	{ id: 2, name: "Jane Smith", email: "jane@example.com" },
];

export default function App() {
	return (
		<Table data={data}>
			<Table.Header>
				<Table.Row>
					<Table.ColumnHeader sortKey="id">ID</Table.ColumnHeader>
					<Table.ColumnHeader sortKey="name">Name</Table.ColumnHeader>
					<Table.ColumnHeader sortKey="email">Email</Table.ColumnHeader>
				</Table.Row>
			</Table.Header>
			<Table.Body>
				{data.map((user) => (
					<Table.Row key={user.id}>
						<Table.Cell>{user.id}</Table.Cell>
						<Table.Cell>{user.name}</Table.Cell>
						<Table.Cell>{user.email}</Table.Cell>
					</Table.Row>
				))}
			</Table.Body>
		</Table>
	);
}

With Sorting

Enable sorting by adding isSortable to column headers and handling onSortColumn.

Name
Email
Role
Status
John Doe
john@example.com
Admin
Active
Jane Smith
jane@example.com
User
Active
Bob Johnson
bob@example.com
User
Inactive
Alice Williams
alice@example.com
Manager
Active
Charlie Brown
charlie@example.com
User
Active

With Pagination

Add pagination using the pagination prop.

Name
Email
Role
John Doe
john@example.com
Admin
Jane Smith
jane@example.com
User
Bob Johnson
bob@example.com
User
Showing 1 to 3 of 5 entries

Width of columns

Control column widths using the width prop on Table.ColumnHeader. You can use any CSS width value like percentages, pixels, or fr units.

Soft

ID
Name
Email
Role
Status
1
John Doe
john@example.com
Admin
Active
2
Jane Smith
jane@example.com
User
Active
3
Bob Johnson
bob@example.com
User
Inactive
4
Alice Williams
alice@example.com
Manager
Active
5
Charlie Brown
charlie@example.com
User
Active

Column Alignment

Control the alignment of cell content using the align prop on Table.Cell. Available options are left, center, and right.

ID
Name
Role
Status
1
John Doe
Admin
Active
2
Jane Smith
User
Active
3
Bob Johnson
User
Inactive

Table Props

Props

Prop
Default
Type
data
undefined
T[]
size
"medium"
"tiny" | "small" | "medium" | "large"
variant
"soft"
"soft" | "underlined" | "bordered" | "striped"
onSortColumn
undefined
(column: string, direction: "asc" | "desc", type: "string" | "number" | "date" | "boolean") => void
pagination
undefined
PaginationConfig

ColumnHeader Props

Props

Prop
Default
Type
sortKey
undefined
string
isSortable
false
boolean
type
"string"
"string" | "number" | "date" | "boolean"
width
undefined
string

Cell Props

Props

Prop
Default
Type
align
"left"
"left" | "center" | "right"

PaginationConfig Type

Props

Prop
Default
Type
page
undefined
number
totalPages
undefined
number
rowsPerPage
undefined
number
totalRows
undefined
number
onPageChange
undefined
(page: number) => void
The modern React component library.
© 2026 Lambda UI. Made with in Mexico by AletzMan.