Skip to main content

Starwind UI v1.6.0 is now available!

Table

Example of a simple table
NameEmailStatus
Ada Lovelace[email protected]Active
Grace Hopper[email protected]Inactive
Total: 2 users

Installation

Usage

Dynamic Data Table Example

Render a table of recent orders using Astro frontmatter and Starwind UI Table components:

A list of your recent orders.
OrderStatusCustomerTotal
ORD1001ShippedAlice Smith$120.00
ORD1002ProcessingBob Johnson$80.00
ORD1003DeliveredCharlie Rose$200.00
ORD1004CancelledDana Lee$50.00
Total Orders$450.00

API Reference

Table

The root table component. Renders a <table> inside a scrollable <div>. Accepts all standard HTML <table> attributes and a class prop for Tailwind styling.

TableHeader

Wraps <thead>. Use to group header rows.

TableHead

Wraps <th>. Use for column headers. Has role="columnheader" and appropriate styles.

TableBody

Wraps <tbody>. Use for the main data rows.

TableRow

Wraps <tr>. Use for each row. Has role="row" and hover/selected states.

TableCell

Wraps <td>. Use for data cells.

TableCaption

Wraps <caption>. Use for table captions. Useful for accessibility.

TableFoot

Wraps <tfoot>. Use for table footers or summary rows.

Changelog

v1.0.0

  • Initial component release with starwind v1.6.0