Data & Status

Typed Data Table

HeroUI 테이블 구조를 참고한 타입 기반 데이터 테이블입니다.

Preview

data structure

Typed Data Table

scan sortable rows

NameRoleStatusEmail
Kate MooreCEOActivekate@acme.com
John SmithCTOActivejohn@acme.com
Sara JohnsonCMOOn Leavesara@acme.com
Michael BrownCFOActivemichael@acme.com

Installation

bash
Copied
1pnpm dlx shadcn@latest add https://ryong.dev/r/data-table.json

Code

typescript
Copied
1import { DataTable } from "@/components/data-table"23export default function Example() {4  return <DataTable columns={columns} rows={rows} />5}

Props

PropTypeDefaultDescription
classNamestring-Additional classes merged onto the component.
columnsDataTableColumn<T>[]-Column definitions.
rowsT[]-Rows to render.

Reference

HeroUI Table