TableHead

The header section of a Table. Renders <thead> and provides TableSectionContext = 'head', which makes descendant TableCells render as <th scope="col">.

The header section of a Table. Renders <thead> and provides TableSectionContext = 'head', which makes descendant TableCells render as <th scope="col">.

<Table>
  <TableHead>
    <TableRow>
      <TableCell>Name</TableCell>
    </TableRow>
  </TableHead>
</Table>

Demos

For usage examples, visit the component demo page: Table

Import

import { TableHead } from '@soroush.tech/design-system/Table'

Props

PropTypeDefaultDescription
colorkeyof Theme['text']-Text color.
bgkeyof Theme['background']-Background color.
asElementType'thead'Overrides the root element.

Also supports styled-system space and border props.

Source code

If this page does not answer your question, have a look at the implementation of the component for more detail.