Skip to content
DesignOSby h4rithd
ui / data-display

Table

Composable, scroll-safe semantic data table primitives.

PREVIEW READY
LIVE PREVIEWDARK / LIGHT COMPATIBLE
ModuleStatusType
Button StablePrimitive
Command menu StableOverlay
Workbench PreviewPattern
INSTALL / SOURCE REGISTRY

Add Table to your project

The command adds the component source and its DesignOS base dependency.

$pnpm dlx shadcn@latest add https://designos.h4rithd.com/r/table.json
registry/default/ui/table.tsx
import * as React from "react"
import { clsx as cn } from "clsx"
import "@/components/designos/designos.css"

export function Table({ className, ...props }: React.TableHTMLAttributes<HTMLTableElement>) { return <div className="dos-table-wrap"><table className={cn("dos-table", className)} {...props} /></div> }
export function TableHeader(props: React.HTMLAttributes<HTMLTableSectionElement>) { return <thead {...props} /> }
export function TableBody(props: React.HTMLAttributes<HTMLTableSectionElement>) { return <tbody {...props} /> }
export function TableRow(props: React.HTMLAttributes<HTMLTableRowElement>) { return <tr {...props} /> }
export function TableHead(props: React.ThHTMLAttributes<HTMLTableCellElement>) { return <th scope={props.scope ?? "col"} {...props} /> }
export function TableCell(props: React.TdHTMLAttributes<HTMLTableCellElement>) { return <td {...props} /> }
export function TableCaption(props: React.HTMLAttributes<HTMLTableCaptionElement>) { return <caption {...props} /> }

Component contract

  • Source-owned after installation
  • Dark and light theme variables
  • Keyboard and visible-focus behavior
  • Reduced-motion fallback
  • Responsive from 320px upward
  • IBM Plex Sans + JetBrains Mono hierarchy