# Table

Use table primitives for structured tabular data. Compose `Header`, `Body`, `Footer`, `Row`, `Head`,
`Cell`, and `Caption` around `Root`.

```svelte
<script lang="ts">
	import * as Table from '~/components/table';
</script>

<Table.Root>
	<Table.Caption>A list of your recent invoices.</Table.Caption>
	<Table.Header>
		<Table.Row>
			<Table.Head class="w-[100px]">Invoice</Table.Head>
			<Table.Head>Status</Table.Head>
			<Table.Head class="text-end">Amount</Table.Head>
		</Table.Row>
	</Table.Header>
	<Table.Body>
		<Table.Row>
			<Table.Cell class="font-medium">INV001</Table.Cell>
			<Table.Cell>Paid</Table.Cell>
			<Table.Cell class="text-end">$250.00</Table.Cell>
		</Table.Row>
	</Table.Body>
	<Table.Footer>
		<Table.Row>
			<Table.Cell colspan={2}>Total</Table.Cell>
			<Table.Cell class="text-end">$250.00</Table.Cell>
		</Table.Row>
	</Table.Footer>
</Table.Root>
```