> ## 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.

# Timeline

> Import and use the Timeline 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 **Timeline** to present structured product information. This page covers every Vue component exported by the public module.

<PharenUiPreview name="timeline" title="Timeline preview" />

<Accordion title="View code">
  ```vue theme={null}
  <script setup lang="ts">
  import { Timeline, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle } from '@pharen/ui';

  const events = [
    { title: 'Workflow created', date: '09:30', text: 'Johannes created the workflow.' },
    { title: 'Test completed', date: '10:05', text: 'All five steps finished successfully.' },
  ];
  </script>

  <template>
    <Timeline class="w-full max-w-md">
      <TimelineItem v-for="event in events" :key="event.title">
        <TimelineIndicator /><TimelineSeparator />
        <TimelineHeader><TimelineTitle>{{ event.title }}</TimelineTitle><TimelineDate>{{ event.date }}</TimelineDate></TimelineHeader>
        <TimelineContent>{{ event.text }}</TimelineContent>
      </TimelineItem>
    </Timeline>
  </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 { Timeline, TimelineContent, TimelineDate, TimelineHeader, TimelineIndicator, TimelineItem, TimelineSeparator, TimelineTitle } from '@pharen/ui';
```

## Exports

| Export              | Purpose                                  |
| ------------------- | ---------------------------------------- |
| `Timeline`          | Exported Vue component from this module. |
| `TimelineContent`   | Contains the visible content.            |
| `TimelineDate`      | Exported Vue component from this module. |
| `TimelineHeader`    | Structures the header region.            |
| `TimelineIndicator` | Exported Vue component from this module. |
| `TimelineItem`      | Represents one item.                     |
| `TimelineSeparator` | Separates adjacent regions.              |
| `TimelineTitle`     | Renders the accessible title.            |

## Source

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