Table

A styled wrapper around `<table>`. Compose the usual `<thead>` and `<tbody>` children inside it, and lead with a `<caption>` so the table has an accessible name.

import { Table } from "@sanity/sanity-id/components/table"

Props

Also accepts every prop of ComponentProps<"table">.

Usage

Table with row and column headers
Performance and scaleSanityContentfulWhy it matters
API Rate limit scopePer IP address (each user/service gets full limits)Per space (entire organization shares one limit)100 editors? Still 10 req/s total. Migration script? Everyone stops work.
Mutation rate limits25 req/s per IP7-10 req/s for entire space"Mission-critical systems competing with auxiliary systems" - actual user quote
1import { Table } from "@sanity/sanity-id/components/table"
2
3export default () => {
4        return (
5          <Table>
6            <thead>
7              <tr>
8                <th>Performance and scale</th>
9                <th>Sanity</th>
10                <th>Contentful</th>
11                <th>Why it matters</th>
12              </tr>
13            </thead>
14            <tbody>
15              <tr>
16                <th>API Rate limit scope</th>
17                <td>Per IP address (each user/service gets full limits)</td>
18                <td>Per space (entire organization shares one limit)</td>
19                <td>100 editors? Still 10 req/s total. Migration script? Everyone stops work.</td>
20              </tr>
21              <tr>
22                <th>Mutation rate limits</th>
23                <td>25 req/s per IP</td>
24                <td>7-10 req/s for entire space</td>
25                <td>"Mission-critical systems competing with auxiliary systems" - actual user quote</td>
26              </tr>
27            </tbody>
28          </Table>
29        )
30      }
Table with column headers
Performance and scaleSanityContentfulWhy it matters
API Rate limit scopePer IP address (each user/service gets full limits)Per space (entire organization shares one limit)100 editors? Still 10 req/s total. Migration script? Everyone stops work.
Mutation rate limits25 req/s per IP7-10 req/s for entire space"Mission-critical systems competing with auxiliary systems" - actual user quote
1import { Table } from "@sanity/sanity-id/components/table"
2
3export default () => {
4        return (
5          <Table>
6            <thead>
7              <tr>
8                <th>Performance and scale</th>
9                <th>Sanity</th>
10                <th>Contentful</th>
11                <th>Why it matters</th>
12              </tr>
13            </thead>
14            <tbody>
15              <tr>
16                <td>API Rate limit scope</td>
17                <td>Per IP address (each user/service gets full limits)</td>
18                <td>Per space (entire organization shares one limit)</td>
19                <td>100 editors? Still 10 req/s total. Migration script? Everyone stops work.</td>
20              </tr>
21              <tr>
22                <td>Mutation rate limits</td>
23                <td>25 req/s per IP</td>
24                <td>7-10 req/s for entire space</td>
25                <td>"Mission-critical systems competing with auxiliary systems" - actual user quote</td>
26              </tr>
27            </tbody>
28          </Table>
29        )
30      }
Table with no headers
API Rate limit scopePer IP address (each user/service gets full limits)Per space (entire organization shares one limit)100 editors? Still 10 req/s total. Migration script? Everyone stops work.
Mutation rate limits25 req/s per IP7-10 req/s for entire space"Mission-critical systems competing with auxiliary systems" - actual user quote
1import { Table } from "@sanity/sanity-id/components/table"
2
3export default () => {
4        return (
5          <Table>
6            <tbody>
7              <tr>
8                <td>API Rate limit scope</td>
9                <td>Per IP address (each user/service gets full limits)</td>
10                <td>Per space (entire organization shares one limit)</td>
11                <td>100 editors? Still 10 req/s total. Migration script? Everyone stops work.</td>
12              </tr>
13              <tr>
14                <td>Mutation rate limits</td>
15                <td>25 req/s per IP</td>
16                <td>7-10 req/s for entire space</td>
17                <td>"Mission-critical systems competing with auxiliary systems" - actual user quote</td>
18              </tr>
19            </tbody>
20          </Table>
21        )
22      }