Primitive / Moleculebeta

Table

Composable data table with semantic sections and glass variant support.

@glinui/uiComponent: table

Installation

Install from the package for shared ownership or from the registry for copy-paste control.

Package Manager

pnpm add @glinui/ui @glinui/tokens

Registry

pnpm dlx @glinui/cli@latest add table

Usage

Basic

ProjectStatusMRR
Glin UIShipping$18,400
Glin DocsActive$7,920
TSX
1import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@glinui/ui"
2
3export function Demo() {
4 return (
5 <Table>
6 <TableHeader>
7 <TableRow>
8 <TableHead>Project</TableHead>
9 <TableHead>Status</TableHead>
10 <TableHead align="right">MRR</TableHead>
11 </TableRow>
12 </TableHeader>
13 <TableBody>
14 <TableRow>
15 <TableCell>Glin UI</TableCell>
16 <TableCell>Shipping</TableCell>
17 <TableCell align="right">$18,400</TableCell>
18 </TableRow>
19 <TableRow>
20 <TableCell>Glin Docs</TableCell>
21 <TableCell>Active</TableCell>
22 <TableCell align="right">$7,920</TableCell>
23 </TableRow>
24 </TableBody>
25 </Table>
26 )
27}

Sticky Header + Striped

RegionUsersConversion
North America12,4008.2%
Europe9,2807.5%
APAC15,0326.9%
LATAM4,3105.8%
Middle East2,9806.2%
Africa1,7404.7%
TSX
1import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@glinui/ui"
2
3const rows = [
4 { region: "North America", users: "12,400", conversion: "8.2%" },
5 { region: "Europe", users: "9,280", conversion: "7.5%" },
6 { region: "APAC", users: "15,032", conversion: "6.9%" },
7 { region: "LATAM", users: "4,310", conversion: "5.8%" }
8]
9
10export function Demo() {
11 return (
12 <Table stickyHeader striped containerClassName="max-h-52">
13 <TableHeader>
14 <TableRow>
15 <TableHead>Region</TableHead>
16 <TableHead align="right">Users</TableHead>
17 <TableHead align="right">Conversion</TableHead>
18 </TableRow>
19 </TableHeader>
20 <TableBody>
21 {rows.map((row) => (
22 <TableRow key={row.region}>
23 <TableCell>{row.region}</TableCell>
24 <TableCell align="right">{row.users}</TableCell>
25 <TableCell align="right">{row.conversion}</TableCell>
26 </TableRow>
27 ))}
28 </TableBody>
29 </Table>
30 )
31}

Glass Metric Grid

FeatureOwnerVelocityStatus
Interactive docs search + semantic indexingCore+18%On Track
Registry artifact validation pipelineInfra+9%Monitoring
TSX
1import { Badge, Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@glinui/ui"
2
3export function Demo() {
4 return (
5 <Table variant="glass" grid>
6 <TableHeader>
7 <TableRow>
8 <TableHead>Feature</TableHead>
9 <TableHead align="center">Owner</TableHead>
10 <TableHead align="right">Velocity</TableHead>
11 <TableHead align="right">Status</TableHead>
12 </TableRow>
13 </TableHeader>
14 <TableBody>
15 <TableRow>
16 <TableCell truncate>Interactive docs search + semantic indexing</TableCell>
17 <TableCell align="center">Core</TableCell>
18 <TableCell align="right">+18%</TableCell>
19 <TableCell align="right"><Badge variant="glass">On Track</Badge></TableCell>
20 </TableRow>
21 <TableRow>
22 <TableCell truncate>Registry artifact validation pipeline</TableCell>
23 <TableCell align="center">Infra</TableCell>
24 <TableCell align="right">+9%</TableCell>
25 <TableCell align="right"><Badge variant="outline">Monitoring</Badge></TableCell>
26 </TableRow>
27 </TableBody>
28 </Table>
29 )
30}

Sticky First Column

Keep identifiers visible in horizontally scrollable comparison tables.

FeatureJanFebMarAprMay
Active Teams8994102108113
Release Velocity+8%+11%+14%+16%+19%
TSX
1import { Table, TableHeader, TableRow, TableHead, TableBody, TableCell } from "@glinui/ui"
2
3export function Demo() {
4 return (
5 <Table stickyFirstColumn noWrap variant="matte">
6 <TableHeader>
7 <TableRow>
8 <TableHead>Feature</TableHead>
9 <TableHead align="right">Jan</TableHead>
10 <TableHead align="right">Feb</TableHead>
11 <TableHead align="right">Mar</TableHead>
12 <TableHead align="right">Apr</TableHead>
13 <TableHead align="right">May</TableHead>
14 </TableRow>
15 </TableHeader>
16 <TableBody>
17 <TableRow>
18 <TableCell>Active Teams</TableCell>
19 <TableCell align="right">89</TableCell>
20 <TableCell align="right">94</TableCell>
21 <TableCell align="right">102</TableCell>
22 <TableCell align="right">108</TableCell>
23 <TableCell align="right">113</TableCell>
24 </TableRow>
25 <TableRow tone="success">
26 <TableCell>Release Velocity</TableCell>
27 <TableCell align="right">+8%</TableCell>
28 <TableCell align="right">+11%</TableCell>
29 <TableCell align="right">+14%</TableCell>
30 <TableCell align="right">+16%</TableCell>
31 <TableCell align="right">+19%</TableCell>
32 </TableRow>
33 </TableBody>
34 </Table>
35 )
36}

Accessibility

  • Native `<table>` semantics with proper `<thead>`/`<tbody>` structure.
  • Use `<th>` for column headers.
  • Sticky headers preserve semantics because structure remains native.

ARIA Attributes

  • Native table semantics with `<th scope>`

Reduced Motion

Row hover color transitions use motion-safe classes with reduced-motion fallback.

Affected properties

background-color

API Reference

Table

PropTypeRequiredDefaultDescription
variant"default" | "glass" | "outline" | "ghost" | "liquid" | "matte"-defaultVisual surface treatment for the container.
size"sm" | "md" | "lg"-mdText and spacing scale.
stickyHeaderboolean-falseMakes `<TableHeader />` stick to the top while scrolling.
stickyFirstColumnboolean-falsePins the first column while horizontally scrolling.
stripedboolean-falseApplies alternating row background treatment.
interactiveboolean-trueEnables row hover treatment.
gridboolean-falseAdds vertical grid separators between cells.
layout"auto" | "fixed"-autoSets table layout algorithm.
noWrapboolean-falseForces single-line cell and header content.
rowDividersboolean-trueToggles horizontal row borders.
containerClassNamestring--Class names for the scroll container wrapper.
align"left" | "center" | "right"No"left"Auto-generated from TypeScript source.
stickybooleanNofalseAuto-generated from TypeScript source.
truncatebooleanNofalseAuto-generated from TypeScript source.

TableHeader

PropTypeRequiredDefaultDescription
classNamestring--Additional class names.
align"left" | "center" | "right"No"left"Auto-generated from TypeScript source.
stickybooleanNofalseAuto-generated from TypeScript source.
truncatebooleanNofalseAuto-generated from TypeScript source.

TableRow

PropTypeRequiredDefaultDescription
tone"default" | "info" | "success" | "warning" | "danger"-defaultApplies semantic row emphasis.
classNamestring--Additional class names.
align"left" | "center" | "right"No"left"Auto-generated from TypeScript source.
stickybooleanNofalseAuto-generated from TypeScript source.
truncatebooleanNofalseAuto-generated from TypeScript source.

TableHead

PropTypeRequiredDefaultDescription
align"left" | "center" | "right"NoleftText alignment for header cells.
stickybooleanNofalsePins a specific header cell to the left.
classNamestring--Additional class names.
truncatebooleanNofalseAuto-generated from TypeScript source.

TableBody

PropTypeRequiredDefaultDescription
classNamestring--Additional class names.
align"left" | "center" | "right"No"left"Auto-generated from TypeScript source.
stickybooleanNofalseAuto-generated from TypeScript source.
truncatebooleanNofalseAuto-generated from TypeScript source.

TableCell

PropTypeRequiredDefaultDescription
align"left" | "center" | "right"NoleftText alignment for body cells.
truncatebooleanNofalseApplies single-line truncation with ellipsis.
stickybooleanNofalsePins a specific body cell to the left.
classNamestring--Additional class names.

Source

Import directly from the package or browse the source on GitHub. Click any file to view it.

Import

import { Table } from "@glinui/ui"

Source Files

Dependencies

@glinui/ui

Generated API Snapshot

Beta

Auto-extracted from TypeScript source in packages/ui/src/components/table.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.

Generated: 2026-02-19T17:59:28.468Z · Full index: /docs/api-metadata

Primary Props Type

TableProps

TableCellProps

PropTypeRequiredDefaultDescription
align"left" | "center" | "right"No"left"-
stickybooleanNofalse-
truncatebooleanNofalse-

TableHeadProps

PropTypeRequiredDefaultDescription
align"left" | "center" | "right"No"left"-
stickybooleanNofalse-

TableProps

PropTypeRequiredDefaultDescription
containerClassNamestringNo--
gridbooleanNofalse-
interactivebooleanNotrue-
layout"auto" | "fixed"No"auto"-
noWrapbooleanNofalse-
rowDividersbooleanNotrue-
size"sm" | "md" | "lg"No"md"Variant option from tableWrapperVariants.
stickyFirstColumnbooleanNofalse-
stickyHeaderbooleanNofalse-
stripedbooleanNofalse-
variant"default" | "glass" | "outline" | "ghost" | "liquid" | "matte"No"default"Variant option from tableWrapperVariants.

TableRowProps

PropTypeRequiredDefaultDescription
toneTableRowToneNo"default"-