Skip to content
Stylhero 0.8.0
Components

Core

Layout and type

Inputs

Overlays

Navigation

Data display

Charts

Transitions and utilities

Page pieces (landing pages, portfolios, docs)

Icons

Components / Core

Table

A styled <table> in a scrolling, bordered wrapper. Write thead/tbody as usual; add sh-num to numeric cells.

import { Table } from "@stylhero/ui";

Example

Code
import { Table } from "@stylhero/ui";

function TableExample() {
  return (
    <Table>
      <thead><tr><th>Part</th><th className="sh-num">Price</th></tr></thead>
      <tbody>
        <tr><td>Ryzen 5 7600</td><td className="sh-num">$199</td></tr>
        <tr><td>RTX 4060</td><td className="sh-num">$299</td></tr>
      </tbody>
    </Table>
  );
}

Props

No props of its own.

Also takes every <table> attribute (id, style, data-*, aria-*, event handlers…), passed to that element.

Generated from src/components/Table.tsx. Something wrong or missing? Open an issue.