> For the complete documentation index, see [llms.txt](https://docs.fact-finder.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fact-finder.com/webcomponents-overview/web-components-4.x./api/navigation/products-per-page.md).

# Products Per Page

Let shoppers choose how many products each page shows.

## Documentation

### Overview

This element lets users set the number of products shown per page. FactFinder backend defines the available options.

* `ff-products-per-page-select` is a native HTML `select` element.
* `ff-products-per-page` is a custom-built dropdown element.
* `ff-products-per-page-list` shows a list with all options always visible.

All three elements can be used with or without additional customization.

### Native HTML select (`ff-products-per-page-select`)

The code below will display a native HTML `select`. You can optionally specify an `option` template. If not specified, it will default to `<option>{{value}}</option>`.

```html
<ff-products-per-page-select>
    <option data-template>Show {{value}} products per page</option>
</ff-products-per-page-select>
```

**Rendered HTML**

When set up like in the example above, the rendered HTML could look like this.

```html
<ff-products-per-page-select>
    <select>
        <option>Show 12 products per page</option>
        <option>Show 24 products per page</option>
    </select>
</ff-products-per-page-select>
```

### Custom-built dropdown (`ff-products-per-page`)

`ff-products-per-page` is a custom-built dropdown. If no `ff-products-per-page-item` template is provided, it defaults to `<ff-products-per-page-item>{{value}}</ff-products-per-page-item>`.

```html
<ff-products-per-page>
    <ff-products-per-page-item>
        <div style="color: blue; font-weight: bold">Show 12 products per page</div>
    </ff-products-per-page-item>
</ff-products-per-page>
```

**Rendered HTML**

When set up like in the example above, the rendered HTML could look like this.

```html
<ff-products-per-page>
    <ff-products-per-page-item class="selected">
        <div style="color: blue; font-weight: bold">Show 12 products per page</div>
    </ff-products-per-page-item>
    <div class="ff-ppp-dropdown-container ff-ppp-dropdown-closed">
        <ff-products-per-page-item>
            <div style="color: blue; font-weight: bold">Show 24 products per page</div>
        </ff-products-per-page-item>
    </div>
</ff-products-per-page>
```

### Products per page as list (`ff-products-per-page-list`)

You can also display a products per page handle as a horizontal list with `ff-products-per-page-list`.

If no `ff-products-per-page-item` is provided as template, it will default to `<ff-products-per-page-item>{{value}}</ff-products-per-page-item>`.

```html
<ff-products-per-page-list>
    <ff-products-per-page-item>{{value}}</ff-products-per-page-item>
</ff-products-per-page-list>
```

## Demo

Try the [Products Per Page demo](https://search-web-components.fact-finder.de/demos/4.x/ff-products-per-page).

## API code

### `ff-products-per-page-dropdown`

**Properties**

<details>

<summary>Properties</summary>

| Name                                                                         | Description                                                |
| ---------------------------------------------------------------------------- | ---------------------------------------------------------- |
| **show-selected** (String) **Options**: "true", "false" (default: "false")   | Shows the selected item in the source list.                |
| **opened** (Boolean) (default: false)                                        | Indicates whether the dropdown menu is open.               |
| **collapse-onblur** (String) **Options**: "true", "false" (default: "false") | Determines whether the element closes when it loses focus. |
| **items** (Array)                                                            | FactFinder data.                                           |

</details>

**Methods**

<details>

<summary>Methods</summary>

| Name                           | Description                                             |
| ------------------------------ | ------------------------------------------------------- |
| **toggle(collapse?: Boolean)** | Opens or closes the element based on its current state. |
| **show()**                     | Opens the dropdown element.                             |
| **hide()**                     | Closes the dropdown element.                            |

</details>

**Events**

<details>

<summary>Events</summary>

| Name            | Description                                                        |
| --------------- | ------------------------------------------------------------------ |
| **dom-updated** | Triggered when the element receives new data and templates render. |

</details>

### `ff-products-per-page-list`

**Events**

<details>

<summary>Events</summary>

| Name            | Description                                                        |
| --------------- | ------------------------------------------------------------------ |
| **dom-updated** | Triggered when the element receives new data and templates render. |

</details>

### `ff-products-per-page-item`

**Properties**

<details>

<summary>Properties</summary>

| Name                                                 | Description                               |
| ---------------------------------------------------- | ----------------------------------------- |
| **products-per-page-item** (Object) (default: empty) | The required data object from FactFinder. |

</details>

### Rendered HTML

When set up like in the example above, the rendered HTML could look like this.

```html
<ff-products-per-page-list>
    <ff-products-per-page-item class="selected">12</ff-products-per-page-item>
    <ff-products-per-page-item>24</ff-products-per-page-item>
</ff-products-per-page-list>
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.fact-finder.com/webcomponents-overview/web-components-4.x./api/navigation/products-per-page.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
