AncrelDocumentationv0.3.0

Search documentation

    Playground / fe.table

    Table playground

    A semantic data table with sticky headers, numeric columns and selected rows.

    Preview

    StageSeconds
    Compile18
    Test32
    Package7

    Props editor

    State matrix

    dark / comfortable
    VariantDefault
    Sample
    StageSeconds
    Compile18
    Test32
    Package7

    Published example

    API reference
    'use client'
    
    import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@ancrel/ui'
    import '@ancrel/tokens/css'
    import '@ancrel/ui/styles.css'
    
    export default function App() {
      return (
        <Table caption="Materials" stickyHeader>
          <TableHeader>
            <TableRow>
              <TableHead>Material</TableHead>
              <TableHead numeric sort="descending">Sheets</TableHead>
            </TableRow>
          </TableHeader>
          <TableBody>
            <TableRow selected><TableHead scope="row">Paper</TableHead><TableCell numeric mono>120</TableCell></TableRow>
            <TableRow><TableHead scope="row">Cardstock</TableHead><TableCell numeric mono>16</TableCell></TableRow>
          </TableBody>
        </Table>
      )
    }