> For the complete documentation index, see [llms.txt](https://developer.usemultiplier.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.usemultiplier.com/multiplier-embed-sdks/components/payroll/eor-payroll.md).

# EOR Payroll

The `EorPayroll` compound component lets partners embed a full **Employer of Record payroll** experience — list and details — without any routing setup. Navigation is handled entirely through callbacks, so the partner retains full control over the page flow.

## Overview

`EorPayroll` exposes two sub-components:

| Component            | Description                                             |
| -------------------- | ------------------------------------------------------- |
| `EorPayroll.List`    | Displays a paginated table of EOR payroll cycles        |
| `EorPayroll.Details` | Renders the full detail view for a single payroll cycle |

The typical pattern is state-driven: store the selected `cycleId` in local state, and conditionally render `List` or `Details` based on whether a cycle has been selected.

## Prerequisites

Both components must be rendered inside a `MultiplierGlobalConfigProvider`. See [Global Configuration](/multiplier-embed-sdks/installation-and-configuration.md#option-b-global-configuration) for setup instructions.

## EorPayroll.List

Renders the list of EOR payroll cycles.

### Basic Usage

```tsx
import { EorPayroll } from '@Multiplier-Core/partner-sdk-react';

function EorPayrollPage() {
  return <EorPayroll.List />;
}
```

### Usage with Row Click Handler

```tsx
import { useState } from 'react';
import { EorPayroll } from '@Multiplier-Core/partner-sdk-react';

function EorPayrollPage() {
  const [cycleId, setCycleId] = useState<string | null>(null);

  if (cycleId) {
    return (
      <EorPayroll.Details
        cycleId={cycleId}
        onBack={() => setCycleId(null)}
      />
    );
  }

  return <EorPayroll.List onRowClick={(id) => setCycleId(id)} />;
}
```

### Props

| Prop         | Type                        | Required | Description                                                                                                  |
| ------------ | --------------------------- | -------- | ------------------------------------------------------------------------------------------------------------ |
| `onRowClick` | `(cycleId: string) => void` | No       | Called when a payroll cycle row is clicked. Use this to store the `cycleId` and render `EorPayroll.Details`. |

## EorPayroll.Details

Renders the full detail view for a single EOR payroll cycle.

### Basic Usage

```tsx
import { EorPayroll } from '@Multiplier-Core/partner-sdk-react';

function EorPayrollDetailsPage({ cycleId }: { cycleId: string }) {
  return <EorPayroll.Details cycleId={cycleId} />;
}
```

### Usage with Back Navigation

```tsx
import { useState } from 'react';
import { EorPayroll } from '@Multiplier-Core/partner-sdk-react';

function EorPayrollPage() {
  const [cycleId, setCycleId] = useState<string | null>(null);

  return cycleId ? (
    <EorPayroll.Details
      cycleId={cycleId}
      onBack={() => setCycleId(null)}
    />
  ) : (
    <EorPayroll.List onRowClick={(id) => setCycleId(id)} />
  );
}
```

### Props

| Prop      | Type         | Required | Description                                                                                                           |
| --------- | ------------ | -------- | --------------------------------------------------------------------------------------------------------------------- |
| `cycleId` | `string`     | **Yes**  | The payroll cycle ID to display. Obtain this from the `onRowClick` callback of `EorPayroll.List`.                     |
| `onBack`  | `() => void` | No       | Called when the user clicks the "Back" button inside the detail view. Use this to navigate back to `EorPayroll.List`. |

## Complete Integration Example

This example shows a real-world integration with routing using React Router:

```tsx
import { useState } from 'react';
import { EorPayroll } from '@Multiplier-Core/partner-sdk-react';

export default function PayrollSection() {
  const [selectedCycleId, setSelectedCycleId] = useState<string | null>(null);

  return (
    <div className="payroll-section">
      {selectedCycleId ? (
        <EorPayroll.Details
          cycleId={selectedCycleId}
          onBack={() => setSelectedCycleId(null)}
        />
      ) : (
        <EorPayroll.List onRowClick={setSelectedCycleId} />
      )}
    </div>
  );
}
```

## CSS Customization

The components expose stable CSS class hooks for layout customization. These classes carry no default styles — they are purely for targeting.

| Class                                  | Element                              | Description                  |
| -------------------------------------- | ------------------------------------ | ---------------------------- |
| `.multiplier-sdk__eor-payroll-list`    | Root wrapper of `EorPayroll.List`    | Wraps the entire list table  |
| `.multiplier-sdk__eor-payroll-details` | Root wrapper of `EorPayroll.Details` | Wraps the entire detail view |

### Example

```css
/* Give the list full page width */
.multiplier-sdk__eor-payroll-list {
  width: 100%;
}

/* Add a card-style container for details */
.multiplier-sdk__eor-payroll-details {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
```

## Notes

* **No router required.** The components work with any navigation strategy (React Router, Next.js, plain `useState`, etc.).
* The `cycleId` you pass to `EorPayroll.Details` is the same ID returned by the `onRowClick` callback of `EorPayroll.List`.
* Both components automatically handle loading states, empty states, and error states internally.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.usemultiplier.com/multiplier-embed-sdks/components/payroll/eor-payroll.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
