HTML table component or styling in sanity-ui?

7 replies
Last updated: Jan 28, 2026
Is there some component or styling for HTML tables in sanity-ui? I guess not, but I just wanted to be sure. Otherwise I'll go with react-table.
AI Update

You're correct – @sanity/ui doesn't include a dedicated Table component. The library focuses on UI primitives and common interface elements, but a table component isn't part of the current offering.

The available components include primitives like Box, Card, Grid, Flex, Stack, and various form elements (Button, Checkbox, TextInput, etc.), plus higher-level components like Autocomplete, Dialog, Menu, and Tab – but no Table component for displaying tabular data.

If you need table functionality, going with a library like react-table (now @tanstack/react-table) is a solid choice. You can still style it to match your Sanity UI theme by wrapping it in Sanity UI primitives like Card, Box, or Stack, and using the theme tokens for consistent spacing and colors.

For example, you could wrap your react-table in a Sanity UI Card component and use Box elements for cells to maintain visual consistency with the rest of your Sanity Studio or application:

import { Card, Box } from '@sanity/ui'
import { useReactTable } from '@tanstack/react-table'

// Your table implementation wrapped in Sanity UI primitives

If you want to explore what's available in @sanity/ui, check out Arcade, which is an interactive playground where you can test all the available components.

Show original thread
7 replies

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?