> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pharen.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Table

> Import and use the Table components from @pharen/ui.

export const PharenUiPreview = ({name, title = 'Pharen UI component preview'}) => <div className="not-prose my-6 overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm dark:border-white/10 dark:bg-zinc-950">
    <div className="pharen-ui-preview-root" data-pharen-ui-preview data-example={name} role="region" aria-label={title} />
  </div>;

Use **Table** to present structured rows and columns. This page covers every Vue component exported by the public module.

<PharenUiPreview name="table" title="Table preview" />

<Accordion title="View code">
  ```vue theme={null}
  <script setup lang="ts">
  import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@pharen/ui';
  </script>

  <template>
    <Table>
      <TableHeader><TableRow><TableHead>Member</TableHead><TableHead>Role</TableHead></TableRow></TableHeader>
      <TableBody><TableRow><TableCell>Johannes</TableCell><TableCell>Owner</TableCell></TableRow></TableBody>
    </Table>
  </template>
  ```
</Accordion>

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @pharen/ui
  ```

  ```bash pnpm theme={null}
  pnpm add @pharen/ui
  ```

  ```bash yarn theme={null}
  yarn add @pharen/ui
  ```

  ```bash bun theme={null}
  bun add @pharen/ui
  ```
</CodeGroup>

<Note>
  Import `@pharen/ui/styles.css` exactly once in your application entrypoint.
</Note>

## Usage

```ts theme={null}
import { Table, TableHeader, TableBody, TableFooter, TableRow, TableHead, TableCell, TableCaption } from '@pharen/ui';
```

## Exports

| Export         | Purpose                                  |
| -------------- | ---------------------------------------- |
| `Table`        | Exported Vue component from this module. |
| `TableHeader`  | Structures the header region.            |
| `TableBody`    | Exported Vue component from this module. |
| `TableFooter`  | Structures the footer region.            |
| `TableRow`     | Exported Vue component from this module. |
| `TableHead`    | Exported Vue component from this module. |
| `TableCell`    | Exported Vue component from this module. |
| `TableCaption` | Exported Vue component from this module. |

## Source

[Open the source on GitHub](https://github.com/PharenIT/ELEV8-Labs/tree/main/src/packages/ui/src/components/table)
