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

# Employee Component

> Live

### Overview

A step-by-step flow designed for employees to enroll themselves and their dependents in available benefit programs. This component is stateful and tracks the enrollement status of an employee. If for example and employee has to re-enroll due to a qualified life event, you simply render this component for the employee and Clasp will take care of the rest.

After enrollment, the Component serves as a consolidated view for employees to see all their enrolled benefits, understand coverage details, access important documents or contact information related to their benefits, and self-serve any qualified life event updates.

### Usage

1. Import the `ClaspEmployee` from the SDK.

```TSX theme={null}
import { ClaspEmployee } from "clasp-components";
```

2. Define the components config object.

```ts theme={null}
let claspConfig = {
    employeeId: "ee_12345",
    navigation: 'state',
    apiClient: 'mock',
    employerName: "Zeek's Coffee",
    platformName: "NeptuneHR",
}
```

| Field | Usage | Type | Description |
| - | - | - | - |
| employeeId | Optional | String | The Clasp employee ID. If not passed in, automatically populates with mock data. |
| navigation | Optional | `url`, `state` | `url` leverages query params, `state` (default) is if you manage clasp-components as a controlled component |
| apiClient | Optional | `mock`, `sandbox`, `prod` | `mock` serves mock data, `sandbox` calls Clasp's sandbox endpoints, and prod is to be passed when used in production |
| employerName | Required | String | The name of the employer which is used to personalize text in the UI. |
| platformName | Required | String | The name of the platform embedding Clasp. Used to personalize text in the UI. |

3. Call the component and pass in config via props.

```TSX theme={null}
<ClaspEmployee config={claspConfig} />
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.