> 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/api/navigation/products-per-page.md).

# Products Per Page

Products Per Page controls let users choose how many results appear on each page. Choose a native select, custom dropdown, or always-visible list.

## Documentation

Products Per Page is a family of three elements that allow you to set the number of products to be shown on a page.

* `ff-products-per-page-select` is a native HTML `select` element.
* `ff-products-per-page-dropdown` 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.

### Defining available options

All three elements have a `values` attribute that must be set. With this attribute, you specify which page sizes shall be available in the element.

```html
<ff-products-per-page-list values="20,40,80,160"></ff-products-per-page-list>
```

Make sure to specify a value that is equal to the default page size that you configure in the FactFinder UI.

If FactFinder returns a page size that is not in the `values` attribute, an additional list item will be created.

### 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 values="12,24,36">
    <option>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 values="12,24,36">
    <select>
        <option>Show 12 products per page</option>
        <option>Show 24 products per page</option>
        <option>Show 36 products per page</option>
    </select>
</ff-products-per-page-select>
```

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

The `ff-products-per-page-dropdown` is a custom-built dropdown. 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-dropdown values="12,24,36">
    <ff-products-per-page-item>
        <div>Show {{value}} products per page</div>
    </ff-products-per-page-item>
</ff-products-per-page-dropdown>
```

#### Rendered HTML

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

```html
<ff-products-per-page-dropdown values="12,24,36">
    <ff-products-per-page-item class="ffw-selected">
        <div>Show 12 products per page</div>
    </ff-products-per-page-item>
    <div class="ffw-ppp-dropdown-container ffw-ppp-dropdown-closed">
        <ff-products-per-page-item>
            <div>Show 24 products per page</div>
        </ff-products-per-page-item>
        <ff-products-per-page-item>
            <div>Show 36 products per page</div>
        </ff-products-per-page-item>
    </div>
</ff-products-per-page-dropdown>
```

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

You can also display products per page in the fashion of a radio button 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 values="12,24,36">
    <ff-products-per-page-item>{{value}} per page</ff-products-per-page-item>
</ff-products-per-page-list>
```

#### Rendered HTML

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

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

## Demo

{% embed url="<https://search-web-components.fact-finder.de/demos/5.x/ff-products-per-page>" %}

## API

### `ff-products-per-page-select`

#### Properties

| Name                             | Description                           |
| -------------------------------- | ------------------------------------- |
| **values** (String) (*required*) | A comma-separated list of page sizes. |

#### Events

| Name            | Description                                                                                                                                  |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **dom-updated** | This event is triggered when the element has received new data and the template for this element and all sub elements have been punched out. |

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

#### Properties

| Name                                                                        | Description                                                                                     |
| --------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| **values** (String) (*required*)                                            | A comma-separated list of page sizes.                                                           |
| **show-selected** (Boolean)                                                 | Determines if the selected `ff-products-per-page-item` is also shown in its source list.        |
| **opened** (Boolean)                                                        | *(Not intended for manual use.)* Set automatically when the dropdown opens. Use it for styling. |
| **collapse-onblur** (String) **Options**: "true", "false" (default: "true") | Determines if the element closes automatically after losing focus.                              |

#### Methods

| Name                         | Description                                              |
| ---------------------------- | -------------------------------------------------------- |
| **toggle(expand?: Boolean)** | Opens or closes the element, based on its current state. |
| **expand()**                 | Expands the dropdown element.                            |
| **collapse()**               | Collapses the dropdown element.                          |

#### Events

| Name            | Description                                                                                                                                  |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **dom-updated** | This event is triggered when the element has received new data and the template for this element and all sub elements have been punched out. |

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

#### Properties

| Name                             | Description                           |
| -------------------------------- | ------------------------------------- |
| **values** (String) (*required*) | A comma-separated list of page sizes. |

#### Events

| Name            | Description                                                                                                                                  |
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **dom-updated** | This event is triggered when the element has received new data and the template for this element and all sub elements have been punched out. |


---

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