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

# Directory Widgets

> Embeddable business directory widgets for external websites

Embed the business directory on external websites to showcase member companies.

## Widget Options

| Widget             | Description                   |
| ------------------ | ----------------------------- |
| Full Directory     | Complete searchable directory |
| Category List      | Companies by category         |
| Featured Companies | Highlighted listings          |
| Search Box         | Directory search widget       |

## Embed Methods

### iframe

```html theme={null}
<iframe 
  src="https://yourorg.memberpulse.com/widgets/directory"
  width="100%" 
  height="600"
  frameborder="0">
</iframe>
```

#### Acceptance Criteria

##### Frontend

* [ ] iframe workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports iframe as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

### JavaScript

```html theme={null}
<div id="mp-directory"></div>
<script src="https://yourorg.memberpulse.com/widgets/directory.js"></script>
<script>
  MPDirectory.init({
    container: '#mp-directory',
    category: 'all',
    limit: 20,
    layout: 'grid'
  });
</script>
```

#### Acceptance Criteria

##### Frontend

* [ ] JavaScript workflow is implemented in the UI as described.

##### Backend / API

* [ ] Backend behavior supports JavaScript as documented.

##### Permissions

* [ ] Access is restricted per the Capabilities matrix on this page (or equivalent role rules).

##### Business Rules

* [ ] All business rules for this feature are enforced.

##### Error Handling

* [ ] Error states return clear messages and appropriate HTTP status codes.

## Configuration Options

| Option   | Values     | Description        |
| -------- | ---------- | ------------------ |
| layout   | grid, list | Display layout     |
| limit    | number     | Companies per page |
| category | string     | Filter by category |
| featured | boolean    | Show featured only |
| search   | boolean    | Show search bar    |

## Styling

Widgets inherit basic styles but can be customized:

* Primary color
* Font family
* Border radius
* Card shadows

## Features

### Directory Widgets

#### Acceptance Criteria

##### Frontend

* [ ] UI supports the workflows described on this page.

##### Backend / API

* [ ] Backend behavior supports these workflows (data fetch, mutations, exports).

##### Permissions

* [ ] Access is restricted per the Capabilities matrix (or role rules) for this area.

##### Business Rules

* [ ] All business rules described on this page are enforced.

##### Error Handling

* [ ] User-visible errors are clear and recoverable where possible.
