Display
Tables
Tables
Full-featured HTML table component with consistent header, body, and footer styling. Supports striped rows, full cell borders, hover highlights, sticky headers, horizontal and vertical scroll, sort indicators, row and cell color highlighting, definition tables, and compact or spacious size variants.
Basic
Add
wf-table
to a standard
<table>
element. Use
thead
,
tbody
, and optionally
tfoot
for semantic structure.
Name
Role
Department
Status
Alice Johnson
Admin
Engineering
Active
Bob Chen
Editor
Design
Active
Carol Davis
Manager
Marketing
Inactive
Dave Wilson
Viewer
Engineering
Active
HTML
Copy
<table class="wf-table">
<thead>
<tr>
<th>Name</th>
<th>Role</th>
<th>Status</th>
</tr>
</thead>
<tbody>
<tr>
<td>Alice Johnson</td>
<td>Admin</td>
<td>Active</td>
</tr>
</tbody>
</table>
Card Wrapper
Wrap the table (or a
wf-table-wrap
) in
wf-table-card
for a bordered container with a drop shadow. Add
wf-table-card-outlined
to keep the border without the shadow.
Default
wf-table-card
Bordered container with a subtle drop shadow.
Name
Role
Status
Alice Johnson
Admin
Active
Bob Chen
Editor
Active
Carol Davis
Manager
Inactive
HTML
Copy
<div class="wf-table-card">
<table class="wf-table">…</table>
</div>
Outlined
wf-table-card-outlined
Same border but shadow removed.
Name
Role
Status
Alice Johnson
Admin
Active
Bob Chen
Editor
Active
Carol Davis
Manager
Inactive
HTML
Copy
<div class="wf-table-card wf-table-card-outlined">
<table class="wf-table">…</table>
</div>
Style Variants
Combine style modifiers freely. All modifiers apply to the
wf-table
element itself.
Striped
wf-table-striped
Alternates the background of every even row.
Name
Role
Status
Alice Johnson
Admin
Active
Bob Chen
Editor
Active
Carol Davis
Manager
Inactive
Dave Wilson
Viewer
Active
HTML
Copy
<table class="wf-table wf-table-striped">…</table>
Hover
wf-table-hover
Highlights rows with a tinted background on hover.
Name
Role
Status
Alice Johnson
Admin
Active
Bob Chen
Editor
Active
Carol Davis
Manager
Inactive
Dave Wilson
Viewer
Active
HTML
Copy
<table class="wf-table wf-table-hover">…</table>
Bordered
wf-table-bordered
Adds a 1px border to every cell.
Name
Role
Status
Alice Johnson
Admin
Active
Bob Chen
Editor
Active
Carol Davis
Manager
Inactive
HTML
Copy
<table class="wf-table wf-table-bordered">…</table>
Borderless
wf-table-borderless
Removes all borders from every section and cell.
Name
Role
Status
Alice Johnson
Admin
Active
Bob Chen
Editor
Active
Carol Davis
Manager
Inactive
HTML
Copy
<table class="wf-table wf-table-borderless">…</table>
Sizes
Add
wf-table-sm
for compact rows or
wf-table-lg
for spacious rows. The default (no modifier) sits between the two.
Small
wf-table-sm
Name
Role
Status
Alice Johnson
Admin
Active
Bob Chen
Editor
Active
Carol Davis
Manager
Inactive
HTML
Copy
<table class="wf-table wf-table-sm">…</table>
Large
wf-table-lg
Name
Role
Status
Alice Johnson
Admin
Active
Bob Chen
Editor
Active
Carol Davis
Manager
Inactive
HTML
Copy
<table class="wf-table wf-table-lg">…</table>
Row & Cell Colors
Apply
wf-row-*
to a
tr
to tint the entire row, or
wf-cell-*
to a single
td
or
th
. Available variants:
primary
,
positive
,
negative
,
alert
,
info
.
Row colors
Name
Role
Status
Alice Johnson
Admin
Primary
Bob Chen
Editor
Positive
Carol Davis
Manager
Negative
Dave Wilson
Viewer
Alert
Eve Martinez
Lead
Info
HTML
Copy
<tr class="wf-row-primary">…</tr>
<tr class="wf-row-positive">…</tr>
<tr class="wf-row-negative">…</tr>
<tr class="wf-row-alert">…</tr>
<tr class="wf-row-info">…</tr>
Cell colors
Name
Role
Status
Alice Johnson
Admin
Primary
Bob Chen
Editor
Positive
Carol Davis
Manager
Negative
Dave Wilson
Viewer
Alert
Eve Martinez
Lead
Info
HTML
Copy
<td class="wf-cell-primary">…</td>
<td class="wf-cell-positive">…</td>
<td class="wf-cell-negative">…</td>
<td class="wf-cell-alert">…</td>
<td class="wf-cell-info">…</td>
Definition
Add
wf-table-definition
to display the first
th
in each body row as a muted label with a right border — ideal for key-value record views.
Name
Alice Johnson
Email
alice@example.com
Department
Engineering
Role
Lead Engineer
Status
Active
HTML
Copy
<table class="wf-table wf-table-definition">
<tbody>
<tr>
<th>Name</th>
<td>Alice Johnson</td>
</tr>
<tr>
<th>Email</th>
<td>alice@example.com</td>
</tr>
<tr>
<th>Department</th>
<td>Engineering</td>
</tr>
</tbody>
</table>
Sort Header
Add
wf-th-sort
to a
th
to show a grab cursor and hover tint. Set
wf-sort-asc
or
wf-sort-desc
(or the equivalent
aria-sort
attribute) to display the active sort arrow. The sort icons are rendered by the WojoIcons font.
Name
Role
Department
Status
Alice Johnson
Admin
Engineering
Active
Bob Chen
Editor
Design
Active
Carol Davis
Manager
Marketing
Inactive
Dave Wilson
Viewer
Engineering
Active
HTML
Copy
<table class="wf-table">
<thead>
<tr>
<!-- Sortable, currently ascending -->
<th class="wf-th-sort wf-sort-asc">Name</th>
<!-- Sortable, no active sort -->
<th class="wf-th-sort">Role</th>
<!-- Sortable, currently descending -->
<th class="wf-th-sort wf-sort-desc">Department</th>
<!-- Non-sortable column -->
<th>Status</th>
</tr>
</thead>
<tbody>…</tbody>
</table>
<!-- aria-sort alternative (accessibility-friendly) -->
<th class="wf-th-sort" aria-sort="ascending">Name</th>
<th class="wf-th-sort" aria-sort="descending">Department</th>
Custom Properties
Property
Default
Description
--wf-surface
#fff
Table background color.
--wf-surface-subtle
#f7f8fa
Header cell and striped row background.
--wf-border
#e5e7eb
Row dividers and cell borders.
--wf-text
#252f4a
Default cell text color.
--wf-text-muted
#6b7280
Header text and caption color.
--wf-radius-surface
var(--wf-radius-5)
Border radius of the card wrapper and bordered header corners.
--wf-table-scroll-h
22rem
Max-height of a
wf-table-scroll
container.
Class Reference
All modifier classes available on
.wf-table
Class
Type
Description
wf-table
Base
Full-width table with consistent spacing, typography, and row dividers.
wf-table-wrap
Layout
Horizontal overflow scroll wrapper. Wraps the table for responsive layouts.
wf-table-scroll
Modifier
Combined with
wf-table-wrap
: adds max-height and vertical scroll. Override height with
--wf-table-scroll-h
. Default: 22rem.
wf-table-card
Layout
Container with a border, shadow, and clipped corners. Variant:
wf-table-card-outlined
removes the shadow.
wf-table-striped
Modifier
Alternates the background of every even row.
wf-table-bordered
Modifier
Adds a 1px border to every cell.
wf-table-borderless
Modifier
Removes all borders from every section and cell.
wf-table-hover
Modifier
Highlights rows with a tinted background on hover.
wf-table-sm
Modifier
Compact padding (0.5rem / 0.75rem) and 0.75rem font size.
wf-table-lg
Modifier
Spacious padding (1.125rem / 1.25rem) and 1rem font size.
wf-table-sticky
Modifier
Makes
thead th
sticky to the top of a scrolling container.
wf-table-fixed
Modifier
Sets
table-layout: fixed
for equal column widths.
wf-table-definition
Modifier
Styles the first
th
in each body row as a muted label with a right border.
wf-th-sort
Interactive
Sortable column header — grab cursor, hover tint. Add
wf-sort-asc
or
wf-sort-desc
(or
aria-sort
) for active direction indicators.
wf-row-primary / wf-row-positive / wf-row-negative / wf-row-alert / wf-row-info
State
Tints all cells in a row using the corresponding semantic color.
wf-cell-primary / wf-cell-positive / wf-cell-negative / wf-cell-alert / wf-cell-info
State
Tints a single cell using the corresponding semantic color.
.auto
Utility
On a
th
or
td
: shrinks the column to fit content (width: 1px, no-wrap).
Show More