Table

Tables are configured using a combination of | pipe characters to separate columns and at least three --- dashes to separate the header row from the table body.

The following sample demonstrates a basic table configuration and the default style:

Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product

The above configuration creates the following table:

Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

The | pipe character column separators are not required to vertically align. Extra whitespace within the column widths is ignored and the result will look the same.

Project | Status | Owner
--- | --- | ---
Website Redesign | [!badge Review] | Operations
Quarterly Forecast | [!badge Approved|success] | Finance
Customer Onboarding | [!badge Draft|secondary] | Product

Clean

Apply the clean class to remove the table borders.

{.clean}
Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Striped

Apply the striped class to alternate the background color of body rows.

Default

{.striped}
Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Clean

{.clean .striped}
Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Compact

Apply the compact class to reduce the cell padding and text size.

Default

{.compact}
Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Clean

{.clean .compact}
Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Striped + Compact

The striped and compact classes can be combined in both default and clean table styles.

Default

{.striped .compact}
Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Clean

{.clean .striped .compact}
Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Alignment

The alignment of text within a column can be configured by using the : colon character within the header separator row.

By default, text is left aligned. To center align text, use :---: with colons at both ends of the header separator. To right align text, use ---: with a colon on the right end of the header separator.

Project              | Status                     | Owner
:---                 | :---:                      | ---:
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Equal

Apply the equal class to distribute the table width evenly across columns.

{.equal}
Project              | Status                     | Owner
---                  | ---                        | ---
Website Redesign     | [!badge Review]            | Operations
Quarterly Forecast   | [!badge Approved|success]  | Finance
Customer Onboarding  | [!badge Draft|secondary]   | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Nowrap

The whitespace-nowrap class prevents text within table cells from wrapping to the next line, keeping all content on a single line. This is useful for maintaining the layout of content that should stay on one line, such as code snippets or long strings.

{.whitespace-nowrap}
Name   | Long Message                                                    | Description
---    | ---                                                             | ---
Item 1 | This is an extra long message that should not wrap in the table | This is a description
Item 2 | Another long content item                                       | Another description
Item 3 | A third example with similarly long content on one line         | A final description
Name Long Message Description
Item 1 This is an extra long message that should not wrap in the table This is a description
Item 2 Another long content item Another description
Item 3 A third example with similarly long content on one line A final description

You can also apply multiple custom CSS classes to combine formatting options:

{.whitespace-nowrap .compact}
Name   | Long Message                                                    | Description
---    | ---                                                             | ---
Item 1 | This is an extra long message that should not wrap in the table | This is a description
Item 2 | Another long content item                                       | Another description
Item 3 | A third example with similarly long content on one line         | A final description
Name Long Message Description
Item 1 This is an extra long message that should not wrap in the table This is a description
Item 2 Another long content item Another description
Item 3 A third example with similarly long content on one line A final description

Column styling

Add attributes to a header cell to apply the same styling to every cell in that column. In this sample, the Status column uses a gray background and stronger header-style text.

Project              | Status {style="background-color: var(--gray-100);"} | Owner
---                  | ---                                                                                                 | ---
Website Redesign     | [!badge Review]                                                                                     | Operations
Quarterly Forecast   | [!badge Approved|success]                                                                            | Finance
Customer Onboarding  | [!badge Draft|secondary]                                                                             | Product
Project Status Owner
Website Redesign Review Operations
Quarterly Forecast Approved Finance
Customer Onboarding Draft Product

Wide tables

Tables that exceed the available page width can be scrolled horizontally. This can happen when a cell contains a large image.

Asset              | Preview                                                            | Notes
---                | ---                                                                | ---
Launch screenshot  | ![](/static/sample-large.jpg){width="960" style="max-width: none;"} | The image keeps its full width inside the cell.
Asset Preview Notes
Launch screenshot The image keeps its full width inside the cell.

Tables with many columns can also overflow the page body and scroll horizontally.

Region | Jan | Feb | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | Total | Forecast | Owner
--- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
North America | 42 | 48 | 53 | 58 | 61 | 67 | 71 | 73 | 69 | 64 | 59 | 55 | 720 | [!badge On track|success] | Operations
Europe | 31 | 34 | 39 | 44 | 49 | 52 | 57 | 59 | 56 | 50 | 46 | 41 | 558 | [!badge Watch|warning] | Growth
Asia Pacific | 28 | 32 | 37 | 43 | 47 | 51 | 55 | 58 | 61 | 63 | 66 | 70 | 611 | [!badge Rising|primary] | Product
Region Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Total Forecast Owner
North America 42 48 53 58 61 67 71 73 69 64 59 55 720 On track Operations
Europe 31 34 39 44 49 52 57 59 56 50 46 41 558 Watch Growth
Asia Pacific 28 32 37 43 47 51 55 58 61 63 66 70 611 Rising Product
component