Back to components
ElementData DisplayFree

Basic Table React component

A clean, semantic table for showing data as it is: plain, striped or bordered, comfortable or compact, a caption and a totals row, custom cells such as status pills, a sticky header that casts a shadow once you scroll, and rows that fade in on load.

About the Basic Table component

Basic Table is a clean, readable data table built from real table markup, for invoices, specs, schedules and comparisons that people read rather than sort or filter. It has a caption above it, a header row, an optional summary row at the bottom, rows that fade in one after another and a soft hover highlight.

columns sets each column's key, label, alignment, width and an optional render function that receives the cell value and the whole row, for badges, links or formatted numbers. rows takes plain objects keyed by column. variant picks plain, striped or bordered and density comfortable or compact. stickyHeader with maxHeight keeps the header in view while the body scrolls, and the table scrolls sideways on narrow screens.

When to use it

Use Basic Table to present data that people read rather than manipulate: invoices, specs, pricing comparisons, schedules, results. It's real table markup, so it's accessible and copies cleanly.

When people need to sort, filter, select or paginate, use Data Table instead.

Installation

Add the Basic Table component to your project with the shadcn CLI. It lands in components/basic-table.tsx as plain React + Tailwind CSS source you own and can edit.

Install
Copied!
npx shadcn@latest add @reactframe/basic-table

Or copy the source by hand and install its dependencies:

Install
Copied!
npm install motion clsx tailwind-merge

Related components

Blockquote
Free
List Group
Free
Chat Bubble
Free
Tree Table
Free
Variant Swatches
Free
Content Switch
Free