Table

A responsive table component for displaying structured data with support for sorting, selection, and custom styling.

Name Email Role Status
Alice Johnson [email protected] Developer Active
Bob Smith [email protected] Designer Active
Carol Davis [email protected] Manager Away
Employee directory - 3 of 24 employees shown

Installation

CLI

Install the component using the StarUI CLI:

star add table

Examples

Interactive Table

Table with selectable rows, actions, and live selection count

Task Priority Due Date Actions
Fix login bug High 2024-01-15
Update documentation Medium 2024-01-20
Code review Low 2024-01-25

Selected tasks: of remaining

Sortable Table

Click column headers to sort by name or size, with ascending/descending toggle

File Name
Size

Documentation.pdf

PDF

2.4 MB

Image.png

Image

5.2 MB

Archive.zip

Archive

10.8 MB

Video.mp4

Video

45.3 MB

Backup.tar

Archive

1.2 MB

Financial Data

Table with footer totals and formatted currency values

Transaction Date Amount Balance
Initial Deposit 2024-01-01 +$1,000.00 $1,000.00
Coffee Purchase 2024-01-02 -$4.50 $995.50
Online Transfer 2024-01-03 -$200.00 $795.50
Salary Deposit 2024-01-15 +$3,500.00 $4,295.50
Total +$4,295.50 $4,295.50
Account transactions for January 2024

Responsive Table

Mobile-friendly table that adapts layout and hides/shows columns at different breakpoints

Resize window - becomes stacked cards on mobile

Order Customer Status Amount
#1001 Shipped $127.50
#1002

Jane Smith

[email protected]

Processing $89.99
#1003

Mike Johnson

[email protected]

Cancelled $45.00

API Reference

Props

Prop Type Default Description
cls str '' Additional CSS classes