Documentation
Design
Components
Table

EccUtilsDesignTable Component

2.0.0-alpha.6
<ecc-utils-design-table/>
EccUtilsDesignTable

Overview

The ecc-utils-design-table component provides a flexible and accessible way to display tabular data. It consists of multiple compound components that work together to create a complete table structure with support for headers, body, footer, and captions.

⚠️

Important: This table uses <div> elements instead of native HTML table elements because the HTML parser doesn't allow custom elements as direct children of <table>, <tr>, etc. The web standards community decided against fixing this parser limitation due to backward compatibility concerns. See WebComponents issue #59 (opens in a new tab) for details.

This component is composed of Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, and TableCaption to create a complete table interface. You must specify width classes on table cells to control column sizing (e.g., className="w-4/12"). Use regular Tailwind classes for widths, not the part: prefix.

Usage

Basic Table

This example shows a basic table with headers, body rows, and a footer.

NameEmailStatusActionsAlice Johnsonalice@example.comActiveEditDeleteBob Smithbob@example.comInactiveEditDeleteCarol Daviscarol@example.comActiveEditDelete

Total: 3 users

Table with Caption

This example shows a table with a caption for additional context.

InvoiceStatusMethodAmountINV001PaidCredit Card$250.00INV002PendingPayPal$150.00INV003UnpaidBank Transfer$350.00A list of recent invoices

Components

ComponentTag NameDescription
Tableecc-utils-design-tableThe root container for the table.
TableHeaderecc-utils-design-table-headerThe header section of the table.
TableBodyecc-utils-design-table-bodyThe body section containing the main data rows.
TableFooterecc-utils-design-table-footerThe footer section of the table.
TableRowecc-utils-design-table-rowA table row in any section.
TableHeadecc-utils-design-table-headA header cell.
TableCellecc-utils-design-table-cellA data cell.
TableCaptionecc-utils-design-table-captionA caption describing the table content.

Properties

The table components do not have any custom properties. All styling and layout is controlled through CSS classes.

Events

The table components are primarily presentational and do not emit custom events. However, you can add standard event listeners to individual cells or rows as needed for your application logic.

Elixir Cloud & AAICloud SDKElixir

Released under Apache 2.0 License.

Copyright © 2023-2025 ELIXIR