bloxa

Table

FREE

Responsive table with striped, hover, bordered, compact, sticky header and stack-on-mobile modes.

Playground

Change the props and watch the component and its code update live.

ComponentCategoryExamples
ButtonForms8
SelectForms4
Data TableData2
GridLayout3
Date PickerForms3
TabsOverlays2
Props
Code
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";

<Table
  striped
  hover
  stackOnMobile
>
  <TableHeader>
    <TableRow>
      <TableHead>Component</TableHead>
      <TableHead>Category</TableHead>
    </TableRow>
  </TableHeader>
  <TableBody>
    <TableRow>
      <TableCell label="Component">Button</TableCell>
      <TableCell label="Category">Forms</TableCell>
    </TableRow>
  </TableBody>
</Table>

Installation

Terminal
npx @bloxa/cli add table
# or: npx shadcn@latest add @bloxa/table

Examples

Striped with hover

Recent invoices
InvoiceCustomerStatusAmount
INV-001Ayşe YılmazPaid₺999
INV-002John CarterPending$49
INV-003Mehmet KayaPaid₺999
INV-004Lena FischerRefunded€45

Cards on mobile

Below md, each row turns into a labelled card.

NameRoleCityJoined
Ayşe YılmazDesign leadIstanbul2024
John CarterEngineerLondon2025
Mehmet KayaEngineerManisa2023

API reference

Every component also accepts the props of the element it renders.

Table

PropTypeDefaultDescription
stripedbooleanfalseAlternating row colors.
hoverbooleanfalseHighlights the hovered row.
borderedbooleanfalseColumn borders.
size"sm" | "md""md"Cell padding.
stickyHeaderbooleanfalseHeader stays visible while scrolling.
stackOnMobilebooleanfalseTurns rows into cards below md (give TableCell a label).

TableCell

PropTypeDefaultDescription
labelstring—Column name in the stacked mobile view.