Table

Rows and columns of data, read across and down. A native <table> in a frame. Specification: docs/components/table.md

Basics

A <div class="canon-table"> around a <table> named by its <caption>: a header row of <th scope="col">, then the rows. Here the caption is visually hidden; the page's heading says the same.

Orders
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled
Shari Feeney PhDcecelia_erdman@yahoo.com$436.68Waiting
Mrs. Jo Emardjovany66@hotmail.com$984.24Delivered

Caption, row headers and footer

A visible <caption> is the table's title row. The first cell of a row can be its header (<th scope="row">), read with every cell of the row. A <tfoot> holds totals.

Invoices this quarter
MonthInvoicesPaidAmount
July4240$18,240.00
August3737$15,915.50
September5144$22,780.25
Total130121$56,935.75

Alignment

Cells start-aligned. data-align="end" (or center) on a cell, its header included, lines up numbers. Figures are tabular, so digits line up anyway.

Orders
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled

Rich content

Cells hold more than text: links, <time>, an Avatar before a name (its fallback aria-hidden, since the name is written beside it), a status Tag. Selecting rows and a row's actions are Data Table's.

Members
MemberRoleStatusLast seen
Edwin MuellerOwnerActive2 hours ago
Suzanne JacobiEditorInvited—
Kellie SchoenViewerSuspended3 weeks ago

Lines, stripes, hover, frame

On the frame: data-lines="grid" adds lines between columns ("none" drops the ones between rows); data-striped fills every other row; data-hover highlights the row under the pointer; data-frame="none" drops the frame, so the table sits on the page. They combine.

Orders, with column lines
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled
Orders, striped
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled
Orders, row under the pointer highlighted
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled
Orders, without a frame
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled
Orders, striped without a frame or lines
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled

Density

data-density on the table or a container: compact rows the button's height, comfortable (the default) 16px taller, spacious 32px taller.

Orders, compact
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled
Orders, comfortable
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled
Orders, spacious
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled

Size

data-size on the table or a container: header rows 32 / 40 / 48, text 12 / 14 / 16px, corners 8 / 12 / 16.

Orders, small
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Orders, medium
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Orders, large
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready

Wide tables

A table wider than its room scrolls sideways inside its frame. Then the frame is a region named after the table, which the keyboard can reach and scroll. Drag the frame's corner.

Orders
UserEmailDateAmountStatus
Edwin Muellertyrese_nicolas@gmail.com$495.90Waiting
Suzanne Jacobicindy_murphy41@yahoo.com$662.02Ready
Kellie Schoentroy.lubowitz@gmail.com$235.71Cancelled

Edge cases

Long text wraps in its cell; header cells stay on one line, and so does a cell with data-wrap="none" (the Title column here), widening the table if it must. An empty cell stays empty. Right to left, the columns read from the right and "end" is the left.

TitleNoteWords
Kickoff meeting with the design teamScope agreed for the first release: the contract, the stylesheet and the reference pages, with checks for every component that ships.25
Review0
المستخدمالتاريخالمبلغ
سارة أحمد16.08.2024495.90 $
علي حسن03.12.2025662.02 $