Structured, themeable, SSR-friendly tables for React and modern web applications.
Structured Table is a powerful toolkit designed to revolutionize how tables are built and managed in modern web development. Unlike traditional table libraries that lock you into specific styles or heavy dependencies, Structured Table separates the core data logic from the visual presentation. It provides a robust "Structured Table Language" (STL) to define data, while allowing you to render pixel-perfect, themeable UIs.
Designed with Server-Side Rendering (SSR) and CMS integration (specifically Sanity) in mind, it ensures that your tables are not only beautiful but also performant and SEO-friendly.
- 🧩 Headless Architecture: The core logic is decoupled from the UI, giving you complete control over the look and feel.
- 🚀 CLI-Driven Component System: Similar to modern UI libraries (like shadcn/ui), use our CLI to scaffold fully customizable table components directly into your codebase. You own the code.
- ⚡ SSR & Server Components: Built for the modern web. Fully compatible with Next.js App Router and React Server Components.
- 🎨 Themeable & Dynamic: Easily style your tables with CSS variables, Tailwind, or any styling solution you prefer.
- 🔌 CMS First: First-class integration with Sanity, allowing content editors to build complex tables effortlessly.
The project consists of two main parts:
structured-table(Core): The lightweight library that parses your data and manages the table state.structured-table-cli(CLI): A command-line tool that generates the actual components (Renderers) into your project.
-
Install the Core Package:
npm install structured-table
-
Add the Renderer: Use the CLI to add the React renderer to your project. This will create the necessary components in your
src/componentsdirectory.npx stl-cli add react
-
Implement in Your App: Import the generated
TableViewcomponent and pass your structured data to it.import { TableView } from "@/components/stl-render-react/latest"; export default function Page() { const data = { ... }; // Your structured table data return <TableView data={data} />; }
packages/structured-table: The core logic and type definitions.packages/structured-table-cli: The CLI tool for managing renderers and scaffolding.apps/web: Documentation and examples.
