Table

Displays tabular data with headers, rows, and optional footer.

Target Catalog Right Ascension Magnitude
Andromeda Galaxy M31 00h 42m 44s 3.44
Orion Nebula M42 05h 35m 17s 4.00
Crab Nebula M1 05h 34m 32s 8.40
Whirlpool Galaxy M51 13h 29m 53s 8.36
Ring Nebula M57 18h 53m 35s 8.80

Installation

CLI

Install the component using the StarUI CLI:

star add table

Examples

Caption & Footer

TableFooter with totals and TableCaption for description

Spring seed inventory.
Variety Type Seeds Germination
Cherokee Purple Tomato 48 89%
Sugar Snap Pea 117 94%
Danvers Half Long Carrot 186 78%
Bloomsdale Spinach 85 91%
Total 436

Selected Rows

TableRow selected prop for persistent highlighted background

Branch Author Status
fix/null-pointer-feed kezhou Merged
feat/dark-mode-toggle priya-s Open
PROJ-412-rate-limit tomek92 Open
docs/api-examples linchen Draft
Pull requests with selected rows highlighted.

Row Actions

DropdownMenu composed in table cells for per-row actions

Recipe Cuisine Time
Miso-Glazed Eggplant Japanese 35 min
Shakshuka Tunisian 25 min
Cacio e Pepe Italian 20 min
Aglio e Olio Italian 15 min
Arepas Reinas Pepiadas Venezuelan 45 min

Rich Composition

Avatar, Badge, Progress, and Skeleton composed in table cells

Learner Language Level Progress
RM
Ren Matsuda
Portuguese B1
62%
AK
Amira Kovacs
Mandarin A2
38%
SK
Sofia Kovacs
Mandarin B1
71%
Language learning progress tracker with a loading placeholder row.

Selection

Checkbox select-all with functional Archive using .then() conditional actions [Signal, sum(), .then()]

From Subject Date
Loom Your recording is ready Feb 21
GitHub New comment on starui#417 Feb 20
Cal.com Booking confirmed: Wed 10 AM Feb 19
Stripe Payout of $1,247.63 initiated Feb 18
Linear Sprint 14 starts Monday Feb 17

Empty State

Empty table body with icon and message using colspan

Endpoint Method Latency

No results found.

API Reference

Props

Prop Type Default Description
selected bool False Sets data-state='selected' on TableRow for highlighted background
cls str '' Additional CSS classes for any subcomponent
wrapper_cls str '' CSS classes for the Table scroll container wrapper
Component Description
Table Root container. Wraps the HTML table in a scroll-enabled div. Use wrapper_cls for the outer div and cls for the inner table
TableHeader Groups header rows. Adds a bottom border to child rows
TableBody Groups data rows. Removes the border from the last row
TableFooter Summary row area with muted background and top border
TableRow Row with hover highlight. Set selected=True for persistent muted background
TableHead Header cell with muted text, medium font weight, and h-10 height
TableCell Data cell with p-2 padding. Use colspan for spanning columns
TableCaption Descriptive text below the table. Renders as HTML caption element