Table

Sortable columns, a cursor row, zebra stripes and figures that line up.

CStatic1972
GoStatic2009
HaskellStatic1990
LuaDynamic1993
PythonDynamic1991
RustStatic2015
TypeScriptStatic2012
ZigStatic2016

Features

  • Sortable columns, a cursor row, zebra stripes, figures at one width; rows glide when sorted.

Use it for

  • Results, inventories.

Installation

  1. Get runets.
    git clone https://github.com/ziyam-khan/runets
  2. Copy these files into your project, keeping their folders.
  3. Install what they use.
    pnpm add react motion lucide-react
  4. Load the styles once. Bring your own base tokens, or use runets’ default theme.
    import 'runets/styles/theme.css'
    import 'runets/styles/kit.css'

Usage

import { Table } from 'runets'

<Table label="Languages" rows={rows} columns={[{ id: 'language', title: 'Language' }, { id: 'year', title: 'First release', align: 'end' }]} />

API

PropTypeWhat it does
columnsColumn[]{ id, title, align, format }.
rowsT[]Data.

Accessibility

Source

The code is in src/kit/surfaces.tsx in runets, MIT licensed.