Data & feedback@neumorphism-ui/table

Table

Composes native table, caption, thead, tbody, tfoot, tr, th, and td elements. An outer container provides overflow-x-auto and a neumorphic raised surface.

@neumorphism-ui/table
Registry JSON

Preview

Watchlist · Data delayed by 10 minutes
SymbolPriceChangeStatus
NVDA$181.92+2.41%Open
005930₩72,400+1.08%Selected
TSLA$318.27−0.64%Watch

Installation

Installation: tablenpx shadcn@latest add @neumorphism-ui/table

The CLI resolves npm dependencies, base tokens, utilities, and component source in order.

New to this Registry? Set up the namespace before continuing.

Usage

Import

Table import code
import {
  Table,
  TableBody,
  TableCaption,
  TableCell,
  TableHead,
  TableHeader,
  TableRow,
} from "@/components/ui/table"

Example

Table usage code
<Table>
  <TableCaption>Recently installed components</TableCaption>
  <TableHeader>
    <TableRow>
      <TableHead scope="col">Component</TableHead>
      <TableHead scope="col">Category</TableHead>
      <TableHead scope="col">Status</TableHead>
    </TableRow>
  </TableHeader>
  <TableBody>
    <TableRow>
      <TableCell>Dialog</TableCell>
      <TableCell>Overlay</TableCell>
      <TableCell>Ready</TableCell>
    </TableRow>
  </TableBody>
</Table>

API Reference

ComponentPropTypeDefaultDescription
TablechildrenrequiredReact.ReactNode—Arranges the caption and table sections.
TableCaptionchildrenReact.ReactNode—Describes the purpose and data scope of the table.
TableHeadscope"col" | "row" | "colgroup" | "rowgroup"—Specifies the direction of cells described by the header.
TableRowdata-state"selected" | string—Enables the inset state for a selected row.
TableCellcolSpan / rowSpannumber—The native span range for a table cell.

Accessibility

  • 01

    Describe the table purpose with TableCaption, using the sr-only class when it should be visually hidden.

  • 02

    Set scope on column and row headers according to their meaning.

  • 03

    Do not use Table solely for layout; use CSS grid or flex instead.