Table

new

Table parts with borders on the cells, sticky header and footer, pinned columns and five row sizes.

Source
Table
A list of your recent invoices.
InvoiceStatusMethodAmount
INV001PaidCredit card$250.00
INV002PendingPayPal$150.00
INV003UnpaidBank transfer$350.00
INV004PaidCredit card$450.00
INV005PaidPayPal$550.00
Total$1,750.00

Open Props in the corner of the example to try size.

Installation

Usage

<script setup lang="ts">
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
</script>

<template>
  <Table>
    <TableHeader>
      <TableRow>
        <TableHead>Name</TableHead>
        <TableHead align="end">Amount</TableHead>
      </TableRow>
    </TableHeader>
    <TableBody>
      <TableRow v-for="row in rows" :key="row.id">
        <TableCell>{{ row.name }}</TableCell>
        <TableCell align="end">{{ row.amount }}</TableCell>
      </TableRow>
    </TableBody>
  </Table>
</template>

The parts are shadcn-vue's, with two differences underneath. Borders sit on the cells, not the rows, under border-collapse: separate, so a sticky header and a pinned cell carry their own lines. Row state never paints the row: hover, selected and stripes set --table-row-bg on the row and every cell paints it, so a pinned cell can stay opaque and still follow the row. The tints are --table-hover-bg, --table-selected-bg and --table-stripe-bg on the table, for a theme to retune.

For columns and data, sorting, pinning and virtualization, see Data Table, which renders these parts' classes.

Table wraps the table in a container that scrolls sideways, as shadcn does. A sticky header cannot stick to that container, which never scrolls vertically. Inside a scroll area, the table's own sideways scrolling turns off and a sticky TableHeader sticks to the area; give the scroll area orientation="both" when the table can be wider than it. On the page, give the table overflow="visible".

Examples

sticky on TableHeader and TableFooter. Inside a scroll area the table needs nothing more: its container stops scrolling, so the viewport is the only scroller between them.

Sticky table header
#OrderTotal
1Order 1000$20
2Order 1001$57
3Order 1002$94
4Order 1003$131
5Order 1004$168
6Order 1005$205
7Order 1006$242
8Order 1007$279
9Order 1008$316
10Order 1009$353
11Order 1010$390
12Order 1011$427
13Order 1012$464
14Order 1013$501
15Order 1014$38
16Order 1015$75
17Order 1016$112
18Order 1017$149
19Order 1018$186
20Order 1019$223
21Order 1020$260
22Order 1021$297
23Order 1022$334
24Order 1023$371
25Order 1024$408
26Order 1025$445
27Order 1026$482
28Order 1027$519
29Order 1028$56
30Order 1029$93
31Order 1030$130
32Order 1031$167
33Order 1032$204
34Order 1033$241
35Order 1034$278
36Order 1035$315
37Order 1036$352
38Order 1037$389
39Order 1038$426
40Order 1039$463
Sum$10660

Sticky to the page

Without a scroller of its own, overflow="visible" lets the header stick to the nearest scrolling ancestor, here the preview's page: scroll inside the preview and the header stays at its top. Under a fixed app bar, set --table-sticky-top on the table, or on the region whose tables stick to the page, to the bar's height, and --table-sticky-bottom for a footer. Leave it off tables in a scroll area of their own.

Header sticky to the page
#SKUNameStockPrice
1SKU-1000Item 10$5.00
2SKU-1007Item 253$24.00
3SKU-1014Item 3106$43.00
4SKU-1021Item 439$62.00
5SKU-1028Item 592$81.00
6SKU-1035Item 625$20.00
7SKU-1042Item 778$39.00
8SKU-1049Item 811$58.00
9SKU-1056Item 964$77.00
10SKU-1063Item 10117$16.00
11SKU-1070Item 1150$35.00
12SKU-1077Item 12103$54.00
13SKU-1084Item 1336$73.00
14SKU-1091Item 1489$12.00
15SKU-1098Item 1522$31.00
16SKU-1105Item 1675$50.00
17SKU-1112Item 178$69.00
18SKU-1119Item 1861$8.00
19SKU-1126Item 19114$27.00
20SKU-1133Item 2047$46.00
21SKU-1140Item 21100$65.00
22SKU-1147Item 2233$84.00
23SKU-1154Item 2386$23.00
24SKU-1161Item 2419$42.00
25SKU-1168Item 2572$61.00
26SKU-1175Item 265$80.00
27SKU-1182Item 2758$19.00
28SKU-1189Item 28111$38.00
29SKU-1196Item 2944$57.00
30SKU-1203Item 3097$76.00
31SKU-1210Item 3130$15.00
32SKU-1217Item 3283$34.00
33SKU-1224Item 3316$53.00
34SKU-1231Item 3469$72.00
35SKU-1238Item 352$11.00
36SKU-1245Item 3655$30.00
37SKU-1252Item 37108$49.00
38SKU-1259Item 3841$68.00
39SKU-1266Item 3994$7.00
40SKU-1273Item 4027$26.00

Pinned columns

pinned="start" or "end" on a head and its cells keeps the column in view while the rest scrolls sideways. The first pinned column needs nothing more; a second one sets --pin-start (or --pin-end) to the width of the first, in style or a class. pinnedEdge on the outermost pinned column draws the shadow, which shows only inside a scroll area and only while there is content under it. Right-to-left mirrors everything.

Pinned columns
ProductJanFebMarAprMayJunJulAugSepOctNovDecYear
Widgets5168851021191361531701872042212381734
Gadgets1021361702042382723063403744084424763468
Gizmos1532042553063574084595105616126637145202
Doohickeys204272340408476544612680748816884526036
Thingamajigs255340425510595680765850351202052905070
Whatsits306408510612714816181202223244265285004
Contraptions357476595714833521712904095286477665838
Gubbins408544680816521883244605967328681045772

Sizes and stripes

size sets the row height through --table-row-h: 28px at xs, then 36, 44 (md, the default), 52 and 60px at xl. The cells' padding above and below the text is --table-cell-py, 8px, and 3px at xs so a line of text still fits. Both sit on the table, set by its size, for a theme to retune. striped tints every even body row.

Sizes
NameRoleEmail
Ada LovelaceEngineerada@example.com
Grace HopperAdmiralgrace@example.com
Katherine JohnsonMathematiciankatherine@example.com

Selection and clickable rows

selected tints a row and clickable makes it a target with tabindex="0". The row keeps no role, so screen readers still read it as a row; handle the click and the Enter and Space keys yourself, and stop the click on controls inside the row.

Row selection
NameSize
Quarterly report.pdf1.2 MB
Board deck.key48 MB
Budget.xlsx310 KB
Notes.md4 KB

Row actions

A menu in a cell gives a row its actions: MenuTrigger with as-child wraps an icon button, and the Menu next to it opens from that button. Label the button with the row, so a screen reader hears which row's actions open.

Actions
InvoiceCustomerStatusAmountActions
INV-1041Ada Lovelacepaid$184.00
INV-1042Grace Hopperopen$640.00
INV-1043Linus Torvaldsoverdue$58.00
INV-1044Margaret Hamiltonpaid$1,299.00
INV-1045Katherine Johnsonopen$320.00

Open a row's menu.

Empty

TableEmpty spans the row with colspan and centres its content.

Empty table
NameStatusAmount
No invoices yet.

Wide

With the default overflow="x" a table wider than its place scrolls sideways inside the container, as shadcn's does. Give the heads a min-w-* so columns keep a readable width.

Wide table
RegionCountryCityQ1Q2Q3Q4TotalGrowthMarginOwnerStatus
Region 1Country 1City 1101112131415161718
Region 2Country 2City 2202224262830323436
Region 3Country 3City 3303336394245485154
Region 4Country 4City 4404448525660646872
Region 5Country 5City 5505560657075808590
Region 6Country 6City 660667278849096102108

Grouped rows

A TableBody per group keeps the borders right: the heading row is an ordinary row with a colspan cell, and only the last row of the last body drops its bottom border.

Grouped rows
NameRoleEmail
Design · 2
Ada LovelaceLeadada@example.com
Mary BlairIllustratormary@example.com
Engineering · 3
Grace HopperCompilergrace@example.com
Margaret HamiltonFlight softwaremargaret@example.com
Katherine JohnsonTrajectorieskatherine@example.com
Research · 1
Marie CurieRadioactivitymarie@example.com

Truncation

layout="fixed" sizes the columns from the header row alone, so truncate on a cell cuts long text with an ellipsis instead of widening the column. Put the full text in title so it is still reachable.

Truncated cells
KeyTitleReporterLabels
KUI-101Sticky header loses its bottom border once the first row scrolls under itada@example.combug, table, sticky
KUI-102Pinned column shadow shows while nothing is scrolled under itgrace@example.combug, pinned
KUI-103Add a density prop so dashboards can pack more rows into the same heightkatherine@example.comenhancement

Right-to-left

pinned="start" and "end" are logical, so under dir="rtl" the start column sits on the right and the shadows mirror.

Right-to-left table
المنتجينايرفبرايرمارسأبريلمايويونيويوليوأغسطسالمجموع
أجهزة1301561822082342602863121768
برمجيات1952342733123513904294682652
خدمات2603123644164685205726243536
تدريب32539045552058565015803020
دعم3904685466242801582362504

Large

Two hundred rows in a scroll area with a sticky header, two pinned columns at the start (the second sets --pin-start to the width of the first) and one at the end, with sizes and stripes to switch.

Large table
#CustomerCityOrdersRevenueRefundsMarginStatus
1Ada LovelaceBerlin0$100010%Churned
2Grace LiskovTokyo37$1011627%Active
3Linus JohnsonBerlin74$1922544%Active
4Margaret HopperTokyo21$2833421%Trial
5Katherine RitchieBerlin58$3744338%Active
6Marie CurieTokyo5$4655215%Churned
7Alan TorvaldsBerlin42$5566132%Trial
8Barbara PerlmanTokyo79$6477049%Active
9Dennis TuringBerlin26$7388626%Active
10Radia HamiltonTokyo63$8299543%Trial
11Ada LovelaceBerlin10$210420%Churned
12Grace LiskovTokyo47$1121337%Active
13Linus JohnsonBerlin84$2032214%Trial
14Margaret HopperTokyo31$2943131%Active
15Katherine RitchieBerlin68$3854048%Active
16Marie CurieTokyo15$4765625%Churned
17Alan TorvaldsBerlin52$5676542%Active
18Barbara PerlmanTokyo89$6587419%Active
19Dennis TuringBerlin36$7498336%Trial
20Radia HamiltonTokyo73$8409213%Active
21Ada LovelaceBerlin20$320130%Churned
22Grace LiskovTokyo57$1231047%Trial
23Linus JohnsonBerlin4$2142624%Active
24Margaret HopperTokyo41$3053541%Active
25Katherine RitchieBerlin78$3964418%Trial
26Marie CurieTokyo25$4875335%Churned
27Alan TorvaldsBerlin62$5786212%Active
28Barbara PerlmanTokyo9$6697129%Trial
29Dennis TuringBerlin46$7608046%Active
30Radia HamiltonTokyo83$8519623%Active
31Ada LovelaceBerlin30$430540%Churned
32Grace LiskovTokyo67$1341417%Active
33Linus JohnsonBerlin14$2252334%Active
34Margaret HopperTokyo51$3163211%Trial
35Katherine RitchieBerlin88$4074128%Active
36Marie CurieTokyo35$4985045%Churned
37Alan TorvaldsBerlin72$5896622%Trial
38Barbara PerlmanTokyo19$6807539%Active
39Dennis TuringBerlin56$7718416%Active
40Radia HamiltonTokyo3$8629333%Trial
41Ada LovelaceBerlin40$540210%Churned
42Grace LiskovTokyo77$1451127%Active
43Linus JohnsonBerlin24$2362044%Trial
44Margaret HopperTokyo61$3273621%Active
45Katherine RitchieBerlin8$4184538%Active
46Marie CurieTokyo45$5095415%Churned
47Alan TorvaldsBerlin82$6006332%Active
48Barbara PerlmanTokyo29$6917249%Active
49Dennis TuringBerlin66$7828126%Trial
50Radia HamiltonTokyo13$8739043%Active
51Ada LovelaceBerlin50$650620%Churned
52Grace LiskovTokyo87$1561537%Trial
53Linus JohnsonBerlin34$2472414%Active
54Margaret HopperTokyo71$3383331%Active
55Katherine RitchieBerlin18$4294248%Trial
56Marie CurieTokyo55$5205125%Churned
57Alan TorvaldsBerlin2$6116042%Active
58Barbara PerlmanTokyo39$7027619%Trial
59Dennis TuringBerlin76$7938536%Active
60Radia HamiltonTokyo23$8849413%Active
61Ada LovelaceBerlin60$760330%Churned
62Grace LiskovTokyo7$1671247%Active
63Linus JohnsonBerlin44$2582124%Active
64Margaret HopperTokyo81$3493041%Trial
65Katherine RitchieBerlin28$4404618%Active
66Marie CurieTokyo65$5315535%Churned
67Alan TorvaldsBerlin12$6226412%Trial
68Barbara PerlmanTokyo49$7137329%Active
69Dennis TuringBerlin86$8048246%Active
70Radia HamiltonTokyo33$8959123%Trial
71Ada LovelaceBerlin70$870040%Churned
72Grace LiskovTokyo17$1781617%Active
73Linus JohnsonBerlin54$2692534%Trial
74Margaret HopperTokyo1$3603411%Active
75Katherine RitchieBerlin38$4514328%Active
76Marie CurieTokyo75$5425245%Churned
77Alan TorvaldsBerlin22$6336122%Active
78Barbara PerlmanTokyo59$7247039%Active
79Dennis TuringBerlin6$8158616%Trial
80Radia HamiltonTokyo43$9069533%Active
81Ada LovelaceBerlin80$980410%Churned
82Grace LiskovTokyo27$1891327%Trial
83Linus JohnsonBerlin64$2802244%Active
84Margaret HopperTokyo11$3713121%Active
85Katherine RitchieBerlin48$4624038%Trial
86Marie CurieTokyo85$5535615%Churned
87Alan TorvaldsBerlin32$6446532%Active
88Barbara PerlmanTokyo69$7357449%Trial
89Dennis TuringBerlin16$8268326%Active
90Radia HamiltonTokyo53$179243%Active
91Ada LovelaceBerlin0$1090120%Churned
92Grace LiskovTokyo37$2001037%Active
93Linus JohnsonBerlin74$2912614%Active
94Margaret HopperTokyo21$3823531%Trial
95Katherine RitchieBerlin58$4734448%Active
96Marie CurieTokyo5$5645325%Churned
97Alan TorvaldsBerlin42$6556242%Trial
98Barbara PerlmanTokyo79$7467119%Active
99Dennis TuringBerlin26$8378036%Active
100Radia HamiltonTokyo63$289613%Trial
101Ada LovelaceBerlin10$1200530%Churned
102Grace LiskovTokyo47$2111447%Active
103Linus JohnsonBerlin84$3022324%Trial
104Margaret HopperTokyo31$3933241%Active
105Katherine RitchieBerlin68$4844118%Active
106Marie CurieTokyo15$5755035%Churned
107Alan TorvaldsBerlin52$6666612%Active
108Barbara PerlmanTokyo89$7577529%Active
109Dennis TuringBerlin36$8488446%Trial
110Radia HamiltonTokyo73$399323%Active
111Ada LovelaceBerlin20$1310240%Churned
112Grace LiskovTokyo57$2221117%Trial
113Linus JohnsonBerlin4$3132034%Active
114Margaret HopperTokyo41$4043611%Active
115Katherine RitchieBerlin78$4954528%Trial
116Marie CurieTokyo25$5865445%Churned
117Alan TorvaldsBerlin62$6776322%Active
118Barbara PerlmanTokyo9$7687239%Trial
119Dennis TuringBerlin46$8598116%Active
120Radia HamiltonTokyo83$509033%Active
121Ada LovelaceBerlin30$1420610%Churned
122Grace LiskovTokyo67$2331527%Active
123Linus JohnsonBerlin14$3242444%Active
124Margaret HopperTokyo51$4153321%Trial
125Katherine RitchieBerlin88$5064238%Active
126Marie CurieTokyo35$5975115%Churned
127Alan TorvaldsBerlin72$6886032%Trial
128Barbara PerlmanTokyo19$7797649%Active
129Dennis TuringBerlin56$8708526%Active
130Radia HamiltonTokyo3$619443%Trial
131Ada LovelaceBerlin40$1530320%Churned
132Grace LiskovTokyo77$2441237%Active
133Linus JohnsonBerlin24$3352114%Trial
134Margaret HopperTokyo61$4263031%Active
135Katherine RitchieBerlin8$5174648%Active
136Marie CurieTokyo45$6085525%Churned
137Alan TorvaldsBerlin82$6996442%Active
138Barbara PerlmanTokyo29$7907319%Active
139Dennis TuringBerlin66$8818236%Trial
140Radia HamiltonTokyo13$729113%Active
141Ada LovelaceBerlin50$1640030%Churned
142Grace LiskovTokyo87$2551647%Trial
143Linus JohnsonBerlin34$3462524%Active
144Margaret HopperTokyo71$4373441%Active
145Katherine RitchieBerlin18$5284318%Trial
146Marie CurieTokyo55$6195235%Churned
147Alan TorvaldsBerlin2$7106112%Active
148Barbara PerlmanTokyo39$8017029%Trial
149Dennis TuringBerlin76$8928646%Active
150Radia HamiltonTokyo23$839523%Active
151Ada LovelaceBerlin60$1750440%Churned
152Grace LiskovTokyo7$2661317%Active
153Linus JohnsonBerlin44$3572234%Active
154Margaret HopperTokyo81$4483111%Trial
155Katherine RitchieBerlin28$5394028%Active
156Marie CurieTokyo65$6305645%Churned
157Alan TorvaldsBerlin12$7216522%Trial
158Barbara PerlmanTokyo49$8127439%Active
159Dennis TuringBerlin86$9038316%Active
160Radia HamiltonTokyo33$949233%Trial
161Ada LovelaceBerlin70$1860110%Churned
162Grace LiskovTokyo17$2771027%Active
163Linus JohnsonBerlin54$3682644%Trial
164Margaret HopperTokyo1$4593521%Active
165Katherine RitchieBerlin38$5504438%Active
166Marie CurieTokyo75$6415315%Churned
167Alan TorvaldsBerlin22$7326232%Active
168Barbara PerlmanTokyo59$8237149%Active
169Dennis TuringBerlin6$148026%Trial
170Radia HamiltonTokyo43$1059643%Active
171Ada LovelaceBerlin80$1970520%Churned
172Grace LiskovTokyo27$2881437%Trial
173Linus JohnsonBerlin64$3792314%Active
174Margaret HopperTokyo11$4703231%Active
175Katherine RitchieBerlin48$5614148%Trial
176Marie CurieTokyo85$6525025%Churned
177Alan TorvaldsBerlin32$7436642%Active
178Barbara PerlmanTokyo69$8347519%Trial
179Dennis TuringBerlin16$258436%Active
180Radia HamiltonTokyo53$1169313%Active
181Ada LovelaceBerlin0$2080230%Churned
182Grace LiskovTokyo37$2991147%Active
183Linus JohnsonBerlin74$3902024%Active
184Margaret HopperTokyo21$4813641%Trial
185Katherine RitchieBerlin58$5724518%Active
186Marie CurieTokyo5$6635435%Churned
187Alan TorvaldsBerlin42$7546312%Trial
188Barbara PerlmanTokyo79$8457229%Active
189Dennis TuringBerlin26$368146%Active
190Radia HamiltonTokyo63$1279023%Trial
191Ada LovelaceBerlin10$2190640%Churned
192Grace LiskovTokyo47$3101517%Active
193Linus JohnsonBerlin84$4012434%Trial
194Margaret HopperTokyo31$4923311%Active
195Katherine RitchieBerlin68$5834228%Active
196Marie CurieTokyo15$6745145%Churned
197Alan TorvaldsBerlin52$7656022%Active
198Barbara PerlmanTokyo89$8567639%Active
199Dennis TuringBerlin36$478516%Trial
200Radia HamiltonTokyo73$1389433%Active

In a card

The container has no border of its own, so a table sits in a Card as it is; pad the outer cells to the card's spacing and keep the caption for assistive technology.

In a card

Deployments

The last four builds of this project.

Recent deployments with their environment and status.
DeploymentEnvironmentCommitWhenStatus
dpl_8f21Productionfeat(table): add the table primitives2 min agoReady
dpl_8f1cPreviewdocs(table): add the Table page18 min agoReady
dpl_8f0aPreviewfeat(scroll-area): add InfiniteScroll1 h agoBuilding
dpl_8ef3Productionfix(core): keep a following tooltip in place3 h agoError

API Reference

Every part accepts class, merged over its base classes.

Data attributes

data-slotAttributesDescription
table-containerdata-overflowThe wrapper; scrolls sideways with overflow x.
tabledata-size, data-stripedThe table. Carries --table-row-h and --table-cell-py for its size, the default --table-row-bg and the three tints.
table-headerdata-stickyThe thead; sticky at top --table-sticky-top, 0 by default.
table-body—A tbody.
table-footerdata-stickyThe tfoot; sticky at bottom --table-sticky-bottom, 0 by default.
table-rowdata-state, data-clickable, data-parityA tr. data-state is selected when selected; the row sets --table-row-bg for its cells.
table-headdata-align, data-pinned, data-pinned-edgeA th with scope col.
table-celldata-align, data-pinned, data-pinned-edge, data-truncateA td.
table-captiondata-visibleThe caption, visually hidden unless visible.
table-empty—The empty row.

Accessibility

Every TableHead renders scope="col". TableCaption is read by assistive technology and hidden from sight unless visible; a table with a purpose that is not obvious from its surroundings should have one. A clickable row is focusable and a pointer target but has no role, since role="button" on a row hides it from some screen readers; give the same action to a control inside the row for keyboard and screen reader users.

Changelog

  1. registry 0.22.0

    6784a5e — ScrollArea sizes from its content: max-h-*, flex-1 (with or without min-h-0), a grid row and auto height work, so a Card body or a chip strip needs no fixed height. A ScrollArea with no size now shows its content instead of collapsing, and virtualize without a bounded height or width warns once in development.

    Inside a ScrollArea, a Table's own sideways scrolling turns off, so a sticky TableHeader sticks to the area; give the ScrollArea orientation="both" when the table can be wider than it.

    36027c4 — A class on Table now retunes its rows and text: the size variables and the text size live on the root, where the class lands, instead of on the inner <table>, which redeclared them. The root also carries data-size.

    22c2911 — Table rows are 36px at sm, as the scale and the DataTable virtualizer's estimate say, not 37px; and a DataTable row with an expand or group toggle keeps its size's row height (44px at md) instead of growing by a pixel to fit the toggle. Virtualized sm tables and tree or grouped tables no longer drift when they scroll to a row.

    70d1620 — Colours written inside arbitrary values and variables now resolve where the element sits, so a .dark island (or any subtree that sets a token) gets its own: the filled Input, InputGroup and DatePicker underline, the Table hover, selected and stripe tints, the disabled Slider and Rating fills and the ColorPicker checkerboard read --theme(--color-x) instead of var(--color-x), which Tailwind resolves once on :root. The ripple wave reads --state-pressed where it is pressed (the ripple item no longer pins --kappa-ripple-opacity on :root), so a subtree that changes --state-pressed changes the wave as well as the state layer.

  2. core 0.16.0

    70d1620 — Colours written inside arbitrary values and variables now resolve where the element sits, so a .dark island (or any subtree that sets a token) gets its own: the filled Input, InputGroup and DatePicker underline, the Table hover, selected and stripe tints, the disabled Slider and Rating fills and the ColorPicker checkerboard read --theme(--color-x) instead of var(--color-x), which Tailwind resolves once on :root. The ripple wave reads --state-pressed where it is pressed (the ripple item no longer pins --kappa-ripple-opacity on :root), so a subtree that changes --state-pressed changes the wave as well as the state layer.

  3. registry 0.21.0

    b073de0 — New DataTree: a tree drawn from data over the Tree parts, as DataTable is over Table. It takes Tree's props, draws each row from the node's icon and label (with a checkbox in checkbox mode, or your own through the item slot), and shows loading (skeleton rows), empty and error states in its frame through loading, empty and error and their slots, error first. virtualize renders only the rows near the view. v-model and v-model:expanded survive a state.

    e5495ef — size works the same way everywhere. Every component exports its size type (AlertSize, BadgeSize, CardSize, CheckboxSize, RadioSize, SwitchSize, EmptySize, InputFloatingSize, ItemSize, ListboxSize, SeparatorSize, SliderSize, StepperSize, TabsSize, TextareaSize, TimelineSize) and the props take it without null; Button-based parts take ButtonSize, Input TextControlSize, SelectTrigger SelectSize and Tree TreeSize. ToggleGroup and ToolbarToggleGroup carry data-size on the group as well. Table's row heights moved into tableSize, so a class on DataTable's ui.table overrides --table-row-h at every size, not only at md.

  4. registry 0.13.0

    93e57a0 — Every size on the control scale is named xs to xl; default and the bare icon are gone. To move over:

    - Button: size="default" becomes size="md", or leave size out; size="icon" becomes size="icon-md". The full set is xs to xl and icon-xs to icon-xl. Toggle, ToggleGroup, ToggleGroupItem, the Toolbar parts, AlertDialogAction, AlertDialogCancel and ToastAction take the same names; Button, Toggle and ToggleGroup default to md, the Toolbar parts keep sm and ToastAction keeps xs. InputGroupButton keeps its own xs, sm, icon-xs and icon-sm, 24 and 32px to fit inside the group, xs by default. Pagination hands its md to Button as it is. Button, Toggle and ToggleGroupItem set data-variant, data-color and data-size even when you leave them at their defaults. - AlertDialogContent: size="default" becomes size="md", still the default; sm is unchanged. The size option of useConfirm's confirm, alert and prompt takes the same names. - Table and DataTable: density becomes size, data-density becomes data-size, and the TableDensity type is now TableSize. sm, md and lg keep their 36, 44 and 52px rows; xs (28px) and xl (60px) are new, and DataTable's virtual row estimates cover them. The cells' padding above and below the text is now --table-cell-py on the table: 8px as before, 3px at xs. At xs, DataTable's sort buttons and expand and group toggles shrink to fit the row. The table-density example is now table-sizes. - DrawerMenu: size takes xs to xl like Menu and reads the control scale, plus room for a thumb. sm, md and lg keep their 40, 48 and 56px rows, padding and icons; xs is 36px and xl 64px. Overriding a --control-* token on :root now resizes DrawerMenu rows as well. - Select and Combobox: the list opens at the trigger's or anchor's size instead of always at md, so <SelectTrigger size="xl"> opens an xl list. size on SelectContent or ComboboxList picks another. Behind an as-child button, set size on ComboboxAnchor to match the button. The Select list now sets its menu variables on SelectContent instead of its viewport, so a class such as [--menu-item-height:2.5rem] on SelectContent reaches the items. - Input, Textarea, InputFloating, SelectTrigger, ComboboxAnchor and Separator set data-size with the default filled in, and the anchor sets data-variant too. With as-child, the anchor leaves the button's own data-variant and data-size alone.

  5. registry 0.5.0

    e931ebe — Add DataTable over TanStack Table v9: columns and data, per-column header and cell slots, sorting with an accessible header button, a scroll area with sticky header and footer, pinned columns with offsets from the width model, density and stripes, row events, client and manual pagination, loading and empty states, and row virtualization with one row group per row and exact spacers. Row selection with a checkbox column, shift-click ranges, a page and select-all banner and a source on update:rowSelection; expanding into detail rows and trees; grouping with aggregated cells; pinned rows in sticky row groups; infinite scroll through onLoadMore, hasMore and loadMore. The table styles gain rowGroup and pinnedRows, a sticky TableHeader and TableFooter read --table-sticky-top and --table-sticky-bottom for the offset under a fixed app bar, and useInfiniteScroll accepts a shouldLoad that returns undefined to fall back to the pixel check.

    79560bc — Add the Table primitives: shadcn-named parts with borders on the cells, sticky header and footer, pinned columns with an edge shadow, density, stripes, selected and clickable rows, a visually hidden caption and an empty row. Their classes are one tableStyles object, which the coming data table shares.